Passed
Push — dev ( b53f20...068554 )
by Janko
09:40
created

Version20250124215954::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Migrations\Pgsql;
6
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9
10
final class Version20250124215954 extends AbstractMigration
11
{
12
    public function getDescription(): string
13
    {
14
        return 'Remove obsolete attributes.';
15
    }
16
17
    public function up(Schema $schema): void
18
    {
19
        $this->addSql('ALTER TABLE stu_spacecraft DROP sensor_range');
20
        $this->addSql('ALTER TABLE stu_spacecraft DROP shield_regeneration_timer');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        $this->addSql('ALTER TABLE stu_spacecraft ADD sensor_range SMALLINT NOT NULL');
26
        $this->addSql('ALTER TABLE stu_spacecraft ADD shield_regeneration_timer INT NOT NULL');
27
    }
28
}
29