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

Version20201216122011::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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\Entity\Course;
10
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
11
use Chamilo\CoreBundle\Repository\Node\CourseRepository;
12
use Chamilo\CourseBundle\Entity\CLp;
13
use Chamilo\CourseBundle\Entity\CLpCategory;
14
use Chamilo\CourseBundle\Entity\CLpItem;
15
use Chamilo\CourseBundle\Repository\CLpCategoryRepository;
16
use Chamilo\CourseBundle\Repository\CLpItemRepository;
17
use Chamilo\CourseBundle\Repository\CLpRepository;
18
use Doctrine\DBAL\Schema\Schema;
19
20
final class Version20201216122011 extends AbstractMigrationChamilo
21
{
22
    public function getDescription(): string
23
    {
24
        return 'Create and modify tables for peer assessment, autogroups, learning paths, group relations, and student publications.';
25
    }
26
27
    public function up(Schema $schema): void
28
    {
29
        $this->addSql("
30
            ALTER TABLE c_lp
31
            ADD IF NOT EXISTS subscribe_user_by_date TINYINT(1) DEFAULT 0 NOT NULL,
32
            ADD IF NOT EXISTS display_not_allowed_lp TINYINT(1) DEFAULT 0
33
        ");
34
    }
35
36
    public function down(Schema $schema): void
37
    {
38
        $this->addSql("
39
            ALTER TABLE c_lp
40
            DROP IF EXISTS subscribe_user_by_date,
41
            DROP IF EXISTS display_not_allowed_lp
42
        ");
43
    }
44
}
45