Passed
Push — master ( 434ab7...a77b75 )
by Aimeos
03:04
created

getPreDependencies()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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 the charset and collations
14
 */
15
class TablesUpdateCharsetCollationLaravel extends \Aimeos\MW\Setup\Task\TablesUpdateCharsetCollation
16
{
17
	private $tables = [
18
		'db-customer' => [
19
			'users' => 'code', 'users_address' => 'email',
20
			'users_list_type' => 'code', 'users_list' => 'refid',
21
			'users_property_type' => 'code', 'users_property' => 'value',
22
		],
23
	];
24
25
26
	/**
27
	 * Returns the list of task names which depends on this task.
28
	 *
29
	 * @return array List of task names
30
	 */
31
	public function getPostDependencies()
32
	{
33
		return ['TablesCreateMShop'];
34
	}
35
36
37
	/**
38
	 * Executes the task
39
	 */
40
	public function migrate()
41
	{
42
		$this->msg( 'Update charset and collation for Laravel tables', 0 );
43
		$this->status( '' );
44
45
		foreach( $this->tables as $rname => $list ) {
46
			$this->checkTables( $list, $rname );
47
		}
48
	}
49
}
50