Passed
Push — master ( a4ea6a...9d0ef3 )
by Julito
11:09
created

Version20211005065400::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 2
rs 10
c 1
b 1
f 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
6
7
use Chamilo\CoreBundle\Entity\Course;
8
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
9
use Chamilo\CoreBundle\Repository\Node\CourseRepository;
10
use Chamilo\CoreBundle\Repository\SessionRepository;
11
use Chamilo\CoreBundle\Repository\ToolRepository;
12
use Chamilo\CourseBundle\Entity\CTool;
13
use Chamilo\CourseBundle\Entity\CToolIntro;
14
use Chamilo\CourseBundle\Repository\CToolIntroRepository;
15
use Chamilo\CourseBundle\Repository\CToolRepository;
16
use Doctrine\DBAL\Schema\Schema;
17
18
final class Version20211005065400 extends AbstractMigrationChamilo
19
{
20
    public function getDescription(): string
21
    {
22
        return 'Plugins - bbb';
23
    }
24
25
    public function up(Schema $schema): void
26
    {
27
        if ($schema->hasTable('plugin_bbb_meeting')) {
28
            $table = $schema->getTable('plugin_bbb_meeting');
29
            if (!$table->hasColumn('internal_meeting_id')) {
30
                //$this->addSql('ALTER TABLE plugin_bbb_meeting ADD COLUMN internal_meeting_id VARCHAR(255) DEFAULT NULL;');
31
            }
32
        }
33
34
        if ($schema->hasTable('plugin_bbb_room')) {
35
            $table = $schema->getTable('plugin_bbb_room');
36
            if (!$table->hasColumn('ALTER TABLE plugin_bbb_room ADD close INT NOT NULL DEFAULT 0;')) {
37
                $this->addSql('');
38
            }
39
        }
40
    }
41
42
    public function down(Schema $schema): void
43
    {
44
    }
45
}
46