| @@ 13-31 (lines=19) @@ | ||
| 10 | ||
| 11 | namespace phpbb\ideas\migrations; |
|
| 12 | ||
| 13 | class m5_base_url_config extends \phpbb\db\migration\migration |
|
| 14 | { |
|
| 15 | public function effectively_installed() |
|
| 16 | { |
|
| 17 | return $this->config->offsetExists('ideas_base_url'); |
|
| 18 | } |
|
| 19 | ||
| 20 | static public function depends_on() |
|
| 21 | { |
|
| 22 | return array('\phpbb\ideas\migrations\m1_initial_schema'); |
|
| 23 | } |
|
| 24 | ||
| 25 | public function update_data() |
|
| 26 | { |
|
| 27 | return array( |
|
| 28 | array('config.add', array('ideas_base_url', '')), |
|
| 29 | ); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| @@ 13-31 (lines=19) @@ | ||
| 10 | ||
| 11 | namespace phpbb\ideas\migrations; |
|
| 12 | ||
| 13 | class m8_cron_data extends \phpbb\db\migration\migration |
|
| 14 | { |
|
| 15 | public function effectively_installed() |
|
| 16 | { |
|
| 17 | return $this->config->offsetExists('ideas_cron_last_run'); |
|
| 18 | } |
|
| 19 | ||
| 20 | static public function depends_on() |
|
| 21 | { |
|
| 22 | return array('\phpbb\ideas\migrations\m1_initial_schema'); |
|
| 23 | } |
|
| 24 | ||
| 25 | public function update_data() |
|
| 26 | { |
|
| 27 | return array( |
|
| 28 | array('config.add', array('ideas_cron_last_run', 0, true)), |
|
| 29 | ); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| @@ 13-34 (lines=22) @@ | ||
| 10 | ||
| 11 | namespace phpbb\ideas\migrations; |
|
| 12 | ||
| 13 | class m12_drop_base_url_config extends \phpbb\db\migration\migration |
|
| 14 | { |
|
| 15 | public function effectively_installed() |
|
| 16 | { |
|
| 17 | return !$this->config->offsetExists('ideas_base_url'); |
|
| 18 | } |
|
| 19 | ||
| 20 | public static function depends_on() |
|
| 21 | { |
|
| 22 | return [ |
|
| 23 | '\phpbb\ideas\migrations\m1_initial_schema', |
|
| 24 | '\phpbb\ideas\migrations\m5_base_url_config', |
|
| 25 | ]; |
|
| 26 | } |
|
| 27 | ||
| 28 | public function update_data() |
|
| 29 | { |
|
| 30 | return [ |
|
| 31 | ['config.remove', ['ideas_base_url']], |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||