Passed
Push — master ( 2daa05...b395ae )
by Aimeos
09:31
created

CustomerRemoveIndexes::after()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
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 CustomerRemoveIndexes extends Base
13
{
14
	public function after() : array
15
	{
16
		return ['Customer'];
17
	}
18
19
20
	public function up()
21
	{
22
		$this->info( 'Remove customer indexes with siteid column first', 'vv' );
23
24
		$this->db( 'db-customer' )
25
			->dropIndex( 'mshop_customer', 'unq_mscus_sid_code' )
26
			->dropIndex( 'mshop_customer', 'idx_mscus_sid_langid' )
27
			->dropIndex( 'mshop_customer', 'idx_mscus_sid_last_first' )
28
			->dropIndex( 'mshop_customer', 'idx_mscus_sid_post_addr1' )
29
			->dropIndex( 'mshop_customer', 'idx_mscus_sid_post_city' )
30
			->dropIndex( 'mshop_customer', 'idx_mscus_sid_city' )
31
			->dropIndex( 'mshop_customer', 'idx_mscus_sid_email' )
32
			->dropIndex( 'mshop_customer_address', 'idx_mscusad_sid_last_first' )
33
			->dropIndex( 'mshop_customer_address', 'idx_mscusad_sid_post_addr1' )
34
			->dropIndex( 'mshop_customer_address', 'idx_mscusad_sid_post_ci' )
35
			->dropIndex( 'mshop_customer_address', 'idx_mscusad_sid_city' )
36
			->dropIndex( 'mshop_customer_address', 'idx_mscusad_sid_email' )
37
			->dropIndex( 'mshop_customer_type', 'unq_mscusty_sid_dom_code' )
38
			->dropIndex( 'mshop_customer_type', 'idx_mscusty_sid_status_pos' )
39
			->dropIndex( 'mshop_customer_type', 'idx_mscusty_sid_label' )
40
			->dropIndex( 'mshop_customer_type', 'idx_mscusty_sid_code' )
41
			->dropIndex( 'mshop_customer_list', 'unq_mscusli_pid_dm_sid_ty_rid' )
42
			->dropIndex( 'mshop_customer_list_type', 'unq_mscuslity_sid_dom_code' )
43
			->dropIndex( 'mshop_customer_list_type', 'idx_mscuslity_sid_status_pos' )
44
			->dropIndex( 'mshop_customer_list_type', 'idx_mscuslity_sid_label' )
45
			->dropIndex( 'mshop_customer_list_type', 'idx_mscuslity_sid_code' )
46
			->dropIndex( 'mshop_customer_property', 'unq_mcuspr_sid_ty_lid_value' )
47
			->dropIndex( 'mshop_customer_property_type', 'unq_mcusprty_sid_dom_code' )
48
			->dropIndex( 'mshop_customer_property_type', 'idx_mcusprty_sid_status_pos' )
49
			->dropIndex( 'mshop_customer_property_type', 'idx_mcusprty_sid_label' )
50
			->dropIndex( 'mshop_customer_property_type', 'idx_mscusprty_code_sid' );
51
	}
52
}
53