Passed
Push — master ( 3890fe...89986e )
by Aimeos
04:24
created

TextRemoveIndexes::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 17
rs 9.7998
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2022
6
 */
7
8
9
namespace Aimeos\Upscheme\Task;
10
11
12
class TextRemoveIndexes extends Base
13
{
14
	public function after() : array
15
	{
16
		return ['Text'];
17
	}
18
19
20
	public function up()
21
	{
22
		$this->info( 'Remove text indexes with siteid column first', 'vv' );
23
24
		$this->db( 'db-text' )
25
			->dropIndex( 'mshop_text', 'idx_mstex_sid_domain_status' )
26
			->dropIndex( 'mshop_text', 'idx_mstex_sid_domain_langid' )
27
			->dropIndex( 'mshop_text', 'idx_mstex_sid_dom_label' )
28
			->dropIndex( 'mshop_text_type', 'unq_mstexty_sid_dom_code' )
29
			->dropIndex( 'mshop_text_type', 'idx_mstexty_sid_status_pos' )
30
			->dropIndex( 'mshop_text_type', 'idx_mstexty_sid_label' )
31
			->dropIndex( 'mshop_text_type', 'idx_mstexty_sid_code' )
32
			->dropIndex( 'mshop_text_list', 'unq_mstexli_pid_dm_sid_ty_rid' )
33
			->dropIndex( 'mshop_text_list_type', 'unq_mstexlity_sid_dom_code' )
34
			->dropIndex( 'mshop_text_list_type', 'idx_mstexlity_sid_status_pos' )
35
			->dropIndex( 'mshop_text_list_type', 'idx_mstexlity_sid_label' )
36
			->dropIndex( 'mshop_text_list_type', 'idx_mstexlity_sid_code' );
37
	}
38
}
39