Passed
Push — dependabot/npm_and_yarn/microm... ( f2f212...f35bf2 )
by
unknown
13:36 queued 05:58
created

Version20201215142608   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A up() 0 3 1
A down() 0 3 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
declare(strict_types=1);
6
7
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
8
9
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
10
use Doctrine\DBAL\Schema\Schema;
11
12
class Version20201215142608 extends AbstractMigrationChamilo
13
{
14
    public function getDescription(): string
15
    {
16
        return 'Create and modify tables for peer assessment, autogroups, learning paths, group relations, and student publications.';
17
    }
18
19
    public function up(Schema $schema): void
20
    {
21
        $this->addSql("
22
            ALTER TABLE c_quiz
23
            ADD IF NOT EXISTS display_chart_degree_certainty INT DEFAULT 0 NOT NULL,
24
            ADD IF NOT EXISTS send_email_chart_degree_certainty INT DEFAULT 0 NOT NULL,
25
            ADD IF NOT EXISTS not_display_balance_percentage_categorie_question INT DEFAULT 0 NOT NULL,
26
            ADD IF NOT EXISTS display_chart_degree_certainty_category INT DEFAULT 0 NOT NULL,
27
            ADD IF NOT EXISTS gather_questions_categories INT DEFAULT 0 NOT NULL
28
        ");
29
    }
30
31
    public function down(Schema $schema): void
32
    {
33
        $this->addSql("
34
            ALTER TABLE c_quiz
35
            DROP IF EXISTS display_chart_degree_certainty,
36
            DROP IF EXISTS send_email_chart_degree_certainty,
37
            DROP IF EXISTS not_display_balance_percentage_categorie_question,
38
            DROP IF EXISTS display_chart_degree_certainty_category,
39
            DROP IF EXISTS gather_questions_categories
40
        ");
41
    }
42
}
43