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

Version20250203092918::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
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 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