Passed
Push — master ( 5d91db...d7e4ff )
by Aimeos
04:15
created

ProductRemoveIndexes::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 27
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 24
c 1
b 0
f 0
dl 0
loc 27
rs 9.536
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 ProductRemoveIndexes extends Base
13
{
14
	public function after() : array
15
	{
16
		return ['Product'];
17
	}
18
19
20
	public function up()
21
	{
22
		$this->info( 'Remove product indexes with siteid column first', 'vv' );
23
24
		$this->db( 'db-product' )
25
			->dropIndex( 'mshop_product', 'unq_mspro_siteid_code' )
26
			->dropIndex( 'mshop_product', 'idx_mspro_id_sid_stat_st_end_rt' )
27
			->dropIndex( 'mshop_product', 'idx_mspro_sid_stat_st_end_rt' )
28
			->dropIndex( 'mshop_product', 'idx_mspro_sid_rating' )
29
			->dropIndex( 'mshop_product', 'idx_mspro_sid_label' )
30
			->dropIndex( 'mshop_product', 'idx_mspro_sid_start' )
31
			->dropIndex( 'mshop_product', 'idx_mspro_sid_type' )
32
			->dropIndex( 'mshop_product', 'idx_mspro_sid_end' )
33
			->dropIndex( 'mshop_product_type', 'unq_msproty_sid_dom_code' )
34
			->dropIndex( 'mshop_product_type', 'idx_msproty_sid_status_pos' )
35
			->dropIndex( 'mshop_product_type', 'idx_msproty_sid_label' )
36
			->dropIndex( 'mshop_product_type', 'idx_msproty_sid_code' )
37
			->dropIndex( 'mshop_product_list', 'unq_msproli_pid_dm_sid_ty_rid' )
38
			->dropIndex( 'mshop_product_list_type', 'unq_msprolity_sid_dom_code' )
39
			->dropIndex( 'mshop_product_list_type', 'idx_msprolity_sid_status_pos' )
40
			->dropIndex( 'mshop_product_list_type', 'idx_msprolity_sid_label' )
41
			->dropIndex( 'mshop_product_list_type', 'idx_msprolity_sid_code' )
42
			->dropIndex( 'mshop_product_property', 'unq_mspropr_sid_ty_lid_value' )
43
			->dropIndex( 'mshop_product_property_type', 'unq_msproprty_sid_dom_code' )
44
			->dropIndex( 'mshop_product_property_type', 'idx_msproprty_sid_status_pos' )
45
			->dropIndex( 'mshop_product_property_type', 'idx_msproprty_sid_label' )
46
			->dropIndex( 'mshop_product_property_type', 'idx_msproprty_sid_code' );
47
	}
48
}
49