Passed
Push — master ( 999eec...31351a )
by Aimeos
05:04
created

CacheRemoveIndexes   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 7 1
A before() 0 3 1
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2021
6
 */
7
8
9
namespace Aimeos\Upscheme\Task;
10
11
12
class CacheRemoveIndexes extends Base
13
{
14
	public function before() : array
15
	{
16
		return ['Cache'];
17
	}
18
19
20
	public function up()
21
	{
22
		$this->info( 'Remove wrong "idx_majob_expire" and "fk_macac_tid" cache indexes', 'v' );
23
24
		$this->db( 'db-cache' )
25
			->dropIndex( 'madmin_cache', 'idx_majob_expire' )
26
			->dropIndex( 'madmin_cache_tag', 'fk_macac_tid' );
27
	}
28
}
29