Total Complexity | 4 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class m181216_043222_rebuild_indexes extends Migration |
||
12 | { |
||
13 | /** |
||
14 | * @inheritdoc |
||
15 | */ |
||
16 | public function safeUp(): bool |
||
17 | { |
||
18 | $this->dropIndexes(); |
||
19 | $this->createIndexes(); |
||
20 | |||
21 | return true; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @return void |
||
26 | */ |
||
27 | protected function dropIndexes() |
||
28 | { |
||
29 | Db::dropIndexIfExists('{{%retour_static_redirects}}', 'redirectSrcUrlParsed', true, $this->db); |
||
30 | Db::dropIndexIfExists('{{%retour_redirects}}', 'redirectSrcUrlParsed', true, $this->db); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return void |
||
35 | */ |
||
36 | protected function createIndexes(): void |
||
50 | ); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | */ |
||
56 | public function safeDown(): bool |
||
61 | } |
||
62 | } |
||
63 |