Passed
Push — dev ( 9894c7...511ebd )
by Nico
27:50 queued 11:44
created

Version20250614091852_NPCLOGFACTION   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
11
final class Version20250614091852_NPCLOGFACTION extends AbstractMigration
12
{
13
    public function getDescription(): string
14
    {
15
        return 'Adds faction_id to npc_log';
16
    }
17
18
    public function up(Schema $schema): void
19
    {
20
        $this->addSql(<<<'SQL'
21
            ALTER TABLE stu_npc_log ADD faction_id INT DEFAULT NULL
22
        SQL);
23
    }
24
25
    public function down(Schema $schema): void
26
    {
27
        $this->addSql(<<<'SQL'
28
            ALTER TABLE stu_npc_log DROP faction_id
29
        SQL);
30
    }
31
}
32