Completed
Branch release-3.2.0 (10f575)
by Daniel
03:11
created

m11_remove_item_status_column   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
c 0
b 0
f 0
dl 0
loc 41
rs 10
wmc 3
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 m11_remove_item_status_column extends \phpbb\db\migration\migration
16
{
17
	/**
18
	 * @inheritdoc
19
	 */
20
	public static function depends_on()
21
	{
22
		return array(
23
			'\blitze\sitemaker\migrations\v20x\m9_update_menu_items_fields',
24
		);
25
	}
26
27
	/**
28
	 * Update the sm_menu_items schema
29
	 *
30
	 * @return array Array of table schema
31
	 * @access public
32
	 */
33
	public function update_schema()
34
	{
35
		return array(
36
			'drop_columns'	=> array(
37
				$this->table_prefix . 'sm_menu_items'	=> array(
38
					'item_status',
39
				),
40
			),
41
		);
42
	}
43
44
	/**
45
	 * Revert schema changes
46
	 *
47
	 * @return array Array of table schema
48
	 * @access public
49
	 */
50
	public function revert_schema()
51
	{
52
		return array(
53
			'add_columns'	=> array(
54
				$this->table_prefix . 'sm_menu_items'	=> array(
55
					'item_status'	=> array('BOOL', 1),
56
				),
57
			),
58
		);
59
	}
60
}
61