Completed
Push — master ( b5a1ce...792ce7 )
by Yannick
17:49 queued 11s
created

Version20191206150000::up()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 2
b 0
f 0
nop 1
dl 0
loc 8
rs 10
nc 2
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
5
6
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
7
use Doctrine\DBAL\Schema\Schema;
8
9
/**
10
 * Class Version20191206150000.
11
 *
12
 * @package Chamilo\CoreBundle\Migrations\Schema\V200
13
 */
14
class Version20191206150000 extends AbstractMigrationChamilo
15
{
16
    public function up(Schema $schema)
17
    {
18
        $this->getEntityManager();
19
20
        $this->addSql('ALTER TABLE extra_field ADD helper_text text DEFAULT NULL AFTER display_text');
21
        $tableObj = $schema->getTable('personal_agenda');
22
        if ($tableObj->hasColumn('course')) {
23
            $this->addSql("ALTER TABLE personal_agenda DROP course");
24
        }
25
    }
26
27
    public function down(Schema $schema)
28
    {
29
    }
30
}
31