Passed
Push — release-3.2.0 ( e3b9c5...a662cc )
by Daniel
02:49
created

m2_initial_data   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 20
c 0
b 0
f 0
dl 0
loc 42
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A revert_data() 0 10 1
A update_data() 0 10 1
A depends_on() 0 5 1
1
<?php
2
/**
3
 *
4
 * @package sitemaker
5
 * @copyright (c) 2013 Daniel A. (blitze)
6
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
 *
8
 */
9
10
namespace blitze\sitemaker\migrations\v20x;
11
12
/**
13
 * Initial schema changes needed for Extension installation
14
 */
15
class m2_initial_data extends \phpbb\db\migration\migration
16
{
17
	/**
18
	 * @inheritdoc
19
	 */
20
	public static function depends_on()
21
	{
22
		return array(
23
			'\blitze\sitemaker\migrations\converter\c2_update_data',
24
			'\blitze\sitemaker\migrations\v20x\m1_initial_schema',
25
		);
26
	}
27
28
	/**
29
	 * @inheritdoc
30
	 */
31
	public function update_data()
32
	{
33
		return array(
34
			array('config.add', array('sitemaker_last_changed', 0)),
35
			array('config.add', array('sitemaker_default_layout', '')),
36
			array('config.add', array('sitemaker_blocks_cleanup_gc', 604800)),
37
			array('config.add', array('sitemaker_blocks_cleanup_last_gc', 0, 1)),
38
			array('config.add', array('sitemaker_startpage_controller', '')),
39
			array('config.add', array('sitemaker_startpage_method', '')),
40
			array('config.add', array('sitemaker_startpage_params', '')),
41
		);
42
	}
43
44
	/**
45
	 * @inheritdoc
46
	 */
47
	public function revert_data()
48
	{
49
		return array(
50
			array('config.remove', array('sitemaker_last_changed')),
51
			array('config.remove', array('sitemaker_default_layout')),
52
			array('config.remove', array('sitemaker_blocks_cleanup_gc')),
53
			array('config.remove', array('sitemaker_blocks_cleanup_last_gc')),
54
			array('config.remove', array('sitemaker_startpage_controller')),
55
			array('config.remove', array('sitemaker_startpage_method')),
56
			array('config.remove', array('sitemaker_startpage_params')),
57
		);
58
	}
59
}
60