Test Failed
Push — dev ( 4abd48...6c393a )
by Janko
09:10
created

getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 1
f 0
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 Version20241228133258_Tholian_Web extends AbstractMigration
11
{
12
    public function getDescription(): string
13
    {
14
        return 'Fixes the tholian web reference.';
15
    }
16
17
    public function up(Schema $schema): void
18
    {
19
        $this->addSql('ALTER TABLE stu_spacecraft DROP CONSTRAINT FK_4BD20E2E73D3801E');
20
        $this->addSql('ALTER TABLE stu_spacecraft ADD CONSTRAINT FK_4BD20E2E73D3801E FOREIGN KEY (holding_web_id) REFERENCES stu_tholian_web (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        $this->addSql('ALTER TABLE stu_spacecraft DROP CONSTRAINT fk_4bd20e2e73d3801e');
26
        $this->addSql('ALTER TABLE stu_spacecraft ADD CONSTRAINT fk_4bd20e2e73d3801e FOREIGN KEY (holding_web_id) REFERENCES stu_tholian_web (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
27
    }
28
}
29