Passed
Push — master ( f02a22...f9b553 )
by Yannick
10:12 queued 03:45
created

Version20230103175130::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
6
7
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
8
use Doctrine\DBAL\Schema\Schema;
9
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20230103175130 extends AbstractMigrationChamilo
14
{
15
    /**
16
     * Return desription of the migration step.
17
     */
18
    public function getDescription(): string
19
    {
20
        return 'change field color length 20 characters';
21
    }
22
23
    public function up(Schema $schema): void
24
    {
25
        $this->addSql(
26
            'ALTER TABLE personal_agenda CHANGE color color varchar(20) NULL;'
27
        );
28
        $this->addSql(
29
            'ALTER TABLE c_calendar_event CHANGE color color varchar(20) NULL;'
30
        );
31
    }
32
33
    public function down(Schema $schema): void
34
    {
35
        $this->addSql(
36
            'ALTER TABLE c_calendar_event CHANGE color color varchar(100) NULL;'
37
        );
38
        $this->addSql(
39
            'ALTER TABLE personal_agenda CHANGE color color varchar(255) NULL;'
40
        );
41
    }
42
}
43