Completed
Push — develop ( 6f1d60...1f2a5d )
by Daniel
11:12
created

m8_remove_config_table   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 39
rs 10
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 m8_remove_config_table 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\m1_initial_schema',
24
			'\blitze\sitemaker\migrations\v20x\m7_update_settings_data',
25
		);
26
	}
27
28
	/**
29
	 * Skip this migration if the sm_blocks_config table does not exist
30
	 *
31
	 * @return bool True to skip this migration, false to run it
32
	 * @access public
33
	 */
34
	public function effectively_installed()
35
	{
36
		return !$this->db_tools->sql_table_exists($this->table_prefix . 'sm_blocks_config');
37
	}
38
39
	/**
40
	 * Update the sm_blocks schema
41
	 *
42
	 * @return array Array of table schema
43
	 * @access public
44
	 */
45
	public function update_schema()
46
	{
47
		return array(
48
			'drop_tables'	=> array(
49
				$this->table_prefix . 'sm_blocks_config',
50
			),
51
		);
52
	}
53
}
54