Passed
Push — dev ( a6938e...dfcc9a )
by Nico
38:24
created

getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Migrations;
6
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9
10
11
final class Version20241008073116_MiningIndices extends AbstractMigration
12
{
13
    public function getDescription(): string
14
    {
15
        return 'Add Inidices';
16
    }
17
18
    public function up(Schema $schema): void
19
    {
20
21
        $this->addSql('ALTER INDEX idx_ac85c1ac64d218e RENAME TO location_id_idx');
22
        $this->addSql('ALTER INDEX idx_ac85c1acb4acc212 RENAME TO commodity_id_idx');
23
        $this->addSql('CREATE INDEX ship_id_idx ON stu_mining_queue (ship_id)');
24
        $this->addSql('ALTER INDEX idx_bbfef8c427d56c25 RENAME TO location_mining_id_idx');
25
    }
26
27
    public function down(Schema $schema): void
28
    {
29
30
        $this->addSql('CREATE SCHEMA public');
31
        $this->addSql('ALTER INDEX commodity_id_idx RENAME TO idx_ac85c1acb4acc212');
32
        $this->addSql('ALTER INDEX location_id_idx RENAME TO idx_ac85c1ac64d218e');
33
        $this->addSql('DROP INDEX ship_id_idx');
34
        $this->addSql('ALTER INDEX location_mining_id_idx RENAME TO idx_bbfef8c427d56c25');
35
    }
36
}
37