Passed
Push — master ( 4aff5b...31f13e )
by David
13:07
created

Version20250109144038::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 18
c 1
b 0
f 0
dl 0
loc 3
rs 9.6666
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Migration;
6
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9
10
class Version20250109144038 extends AbstractMigration
11
{
12
    public function up(Schema $schema): void
13
    {
14
        // Remove dilps_domain from the fulltext index.
15
        $this->addSql(<<<'SQL'
16
                DROP INDEX FULLTEXT__CARD_CUSTOM_SEARCH ON card;
17
                CREATE FULLTEXT INDEX FULLTEXT__CARD_CUSTOM_SEARCH ON card (
18
                    dating,
19
                    cached_artist_names,
20
                    addition,
21
                    expanded_name,
22
                    material,
23
                    technique_author,
24
                    object_reference,
25
                    corpus,
26
                    street,
27
                    locality,
28
                    code,
29
                    name
30
                );
31
            SQL);
32
    }
33
34
    public function down(Schema $schema): void
35
    {
36
        $this->addSql(<<<'SQL'
37
                DROP INDEX FULLTEXT__CARD_CUSTOM_SEARCH ON card;
38
                CREATE FULLTEXT INDEX FULLTEXT__CARD_CUSTOM_SEARCH ON card (
39
                    dating,
40
                    cached_artist_names,
41
                    addition,
42
                    expanded_name,
43
                    material,
44
                    dilps_domain,
45
                    technique_author,
46
                    object_reference,
47
                    corpus,
48
                    street,
49
                    locality,
50
                    code,
51
                    name
52
                );
53
            SQL);
54
    }
55
}
56