1 | <?php |
||
15 | class m12_add_hidden_forum_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\m1_initial_schema', |
||
24 | ); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Skip this migration if the hidden_forum column already exists |
||
29 | * |
||
30 | * @return bool True to skip this migration, false to run it |
||
31 | * @access public |
||
32 | */ |
||
33 | public function effectively_installed() |
||
34 | { |
||
35 | return $this->db_tools->sql_column_exists($this->table_prefix . 'forums', 'hidden_forum'); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Update forums table schema |
||
40 | * |
||
41 | * @return array Array of table schema |
||
42 | * @access public |
||
43 | */ |
||
44 | public function update_schema() |
||
45 | { |
||
46 | return array( |
||
47 | 'add_columns' => array( |
||
48 | $this->table_prefix . 'forums' => array( |
||
49 | 'hidden_forum' => array('BOOL', 0), |
||
50 | ), |
||
51 | ), |
||
52 | ); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | public function update_data() |
||
59 | { |
||
60 | return array( |
||
61 | array('custom', array(array($this, 'set_hidden_forums'))), |
||
62 | ); |
||
63 | } |
||
64 | |||
65 | public function update_blocks_settings() |
||
74 |