Passed
Push — master ( 995eb2...f02a22 )
by Yannick
07:05 queued 43s
created

Version20230124123419::getDescription()   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 0
dl 0
loc 3
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
final class Version20230124123419 extends AbstractMigrationChamilo
11
{
12
    public function getDescription(): string
13
    {
14
        return 'Rename c_lp.publicated_on to c_lp.published_on';
15
    }
16
17
    public function up(Schema $schema): void
18
    {
19
        if ($schema->hasTable('c_lp')) {
20
            $this->addSql(
21
                'ALTER TABLE c_lp CHANGE publicated_on published_on datetime NULL;'
22
            );
23
        }
24
    }
25
26
    public function down(Schema $schema): void
27
    {
28
        if ($schema->hasTable('c_lp')) {
29
            $this->addSql(
30
                'ALTER TABLE c_lp CHANGE published_on publicated_on datetime NULL;'
31
            );
32
        }
33
    }
34
}
35