CustomerRemoveIndexesLaravel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A after() 0 3 1
A up() 0 20 1
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2022-2025
6
 */
7
8
9
namespace Aimeos\Upscheme\Task;
10
11
12
class CustomerRemoveIndexesLaravel 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( 'users', 'idx_lvu_lastname' )
26
			->dropIndex( 'users', 'idx_lvu_langid' )
27
			->dropIndex( 'users_address', 'idx_lvuad_langid' )
28
			->dropIndex( 'users_list', 'unq_lvuli_pid_dm_sid_ty_rid' )
29
			->dropIndex( 'users_list_type', 'unq_lvulity_sid_dom_code' )
30
			->dropIndex( 'users_list_type', 'idx_lvulity_sid_status_pos' )
31
			->dropIndex( 'users_list_type', 'idx_lvulity_sid_label' )
32
			->dropIndex( 'users_list_type', 'idx_lvulity_sid_code' )
33
			->dropIndex( 'users_property', 'fk_lvupr_key_sid' )
34
			->dropIndex( 'users_property', 'unq_lvupr_sid_ty_lid_value' )
35
			->dropIndex( 'users_property_type', 'unq_lvuprty_sid_dom_code' )
36
			->dropIndex( 'users_property_type', 'idx_lvuprty_sid_status_pos' )
37
			->dropIndex( 'users_property_type', 'idx_lvuprty_sid_label' )
38
			->dropIndex( 'users_property_type', 'idx_lvuprty_sid_code' )
39
			->dropIndex( 'users_property_type', 'fk_lvupr_key_sid' );
40
	}
41
}
42