Passed
Push — dev ( 216c8f...156d5c )
by Janko
15:03
created

Version20250617124515   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A getDescription() 0 3 1
A up() 0 3 1
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 Version20250617124515 extends AbstractMigration
11
{
12
    public function getDescription(): string
13
    {
14
        return 'Remove obsolete field.';
15
    }
16
17
    public function up(Schema $schema): void
18
    {
19
        $this->addSql(<<<'SQL'
20
            ALTER TABLE stu_user DROP maptype
21
        SQL);
22
    }
23
24
    public function down(Schema $schema): void
25
    {
26
        $this->addSql(<<<'SQL'
27
            ALTER TABLE stu_user ADD maptype SMALLINT DEFAULT NULL
28
        SQL);
29
    }
30
}
31