Passed
Pull Request — master (#2027)
by Nico
21:19 queued 10:33
created

Version20250203092918   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 7 1
A getDescription() 0 3 1
A up() 0 8 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 Version20250203092918 extends AbstractMigration
11
{
12
    public function getDescription(): string
13
    {
14
        return 'Renaming some indices.';
15
    }
16
17
    public function up(Schema $schema): void
18
    {
19
        // this up() migration is auto-generated, please modify it to your needs
20
        $this->addSql('ALTER INDEX ship_crew_spacecraft_idx RENAME TO IDX_4793ED241C6AF6FD');
21
        $this->addSql('ALTER INDEX ship_crew_colony_idx RENAME TO IDX_4793ED2496ADBADE');
22
        $this->addSql('ALTER INDEX ship_crew_tradepost_idx RENAME TO IDX_4793ED248B935ABD');
23
        $this->addSql('ALTER INDEX ship_crew_user_idx RENAME TO IDX_4793ED24A76ED395');
24
        $this->addSql('ALTER INDEX ship_crew_crew_idx RENAME TO crew_assign_crew_idx');
25
    }
26
27
    public function down(Schema $schema): void
28
    {
29
        $this->addSql('ALTER INDEX idx_4793ed24a76ed395 RENAME TO ship_crew_user_idx');
30
        $this->addSql('ALTER INDEX idx_4793ed248b935abd RENAME TO ship_crew_tradepost_idx');
31
        $this->addSql('ALTER INDEX idx_4793ed241c6af6fd RENAME TO ship_crew_spacecraft_idx');
32
        $this->addSql('ALTER INDEX crew_assign_crew_idx RENAME TO ship_crew_crew_idx');
33
        $this->addSql('ALTER INDEX idx_4793ed2496adbade RENAME TO ship_crew_colony_idx');
34
    }
35
}
36