Passed
Push — master ( 05ca27...633235 )
by Aimeos
03:28
created

TablesMigrateSiteidLaravel::getPreDependencies()   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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2019
6
 */
7
8
9
namespace Aimeos\MW\Setup\Task;
10
11
12
/**
13
 * Updates site ID columns
14
 */
15
class TablesMigrateSiteidLaravel extends TablesMigrateSiteid
16
{
17
	private $resources = [
18
		'db-customer' => [
19
			'users_list_type', 'users_property_type',
20
			'users_property', 'users_list', 'users_address', 'users',
21
		],
22
	];
23
24
25
	/**
26
	 * Returns the list of task names which this task depends on.
27
	 *
28
	 * @return string[] List of task names
29
	 */
30
	public function getPreDependencies() : array
31
	{
32
		return ['TablesMigrateSiteid'];
33
	}
34
35
36
	/**
37
	 * Returns the list of task names which this task depends on.
38
	 *
39
	 * @return string[] List of task names
40
	 */
41
	public function getPostDependencies() : array
42
	{
43
		return ['TablesCreateMShop'];
44
	}
45
46
47
	/**
48
	 * Executes the task
49
	 */
50
	public function migrate()
51
	{
52
		$this->msg( 'Update Laravel "siteid" columns', 0, '' );
53
54
		$this->process( $this->resources );
55
	}
56
}
57