From c40f7a6bde30668caa59f4242ce942a4ee3b45f4 Mon Sep 17 00:00:00 2001 From: Sajaki Date: Mon, 5 Apr 2021 19:49:30 +0200 Subject: [PATCH] mig 2.0.0 --- migrations/release_2_0_0.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/migrations/release_2_0_0.php b/migrations/release_2_0_0.php index 1c9247a..6934be5 100644 --- a/migrations/release_2_0_0.php +++ b/migrations/release_2_0_0.php @@ -49,6 +49,41 @@ public function revert_schema() public function update_data() { return [ + + // Remove old config if it exists + ['if', [ + isset($this->config['recenttopics']), + ['config.remove', ['recenttopics']], + ]], + ['if', [ + isset($this->config['rt_mod_version']), + ['config.remove', ['rt_mod_version']], + ]], + ['if', [ + isset($this->config['rt_version']), + ['config.remove', ['rt_version']], + ]], + ['if', [ + isset($this->config['rt_number']), + ['config.remove', ['rt_number']], + ]], + ['if', [ + isset($this->config['rt_page_number']), + ['config.remove', ['rt_page_number']], + ]], + ['if', [ + isset($this->config['rt_anti_topics']), + ['config.remove', ['rt_anti_topics']], + ]], + ['if', [ + isset($this->config['rt_parents']), + ['config.remove', ['rt_parents']], + ]], + ['if', [ + isset($this->config['rt_index']), + ['config.remove', ['rt_index']], + ]], + // Add new config vars ['config.add', ['rt_version', '2.0.0']], ['config.add', ['rt_number', 5]],