From f4411b41bf2bd39160d317d9acff3617c466d61d Mon Sep 17 00:00:00 2001 From: rxu Date: Wed, 29 Apr 2020 19:59:58 +0700 Subject: [PATCH] Adjust migrations effectively_installed methods to ensure correct running. --- migrations/v_1_2_8.php | 4 +++- migrations/v_1_3_4.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migrations/v_1_2_8.php b/migrations/v_1_2_8.php index 3a997ec..d2e3e74 100644 --- a/migrations/v_1_2_8.php +++ b/migrations/v_1_2_8.php @@ -14,7 +14,9 @@ class v_1_2_8 extends \phpbb\db\migration\migration { public function effectively_installed() { - return isset($this->config['thanks_top_number']); + return $this->db_tools->sql_column_exists($this->table_prefix . 'thanks', 'topic_id') && + $this->db_tools->sql_column_exists($this->table_prefix . 'thanks', 'forum_id') && + $this->db_tools->sql_column_exists($this->table_prefix . 'thanks', 'thanks_time'); } static public function depends_on() diff --git a/migrations/v_1_3_4.php b/migrations/v_1_3_4.php index ef681c7..3a93f03 100644 --- a/migrations/v_1_3_4.php +++ b/migrations/v_1_3_4.php @@ -14,7 +14,7 @@ class v_1_3_4 extends \phpbb\db\migration\migration { public function effectively_installed() { - return isset($this->config['thanks_global_announce']); + return $this->db_tools->sql_index_exists($this->table_prefix . 'thanks', 'poster_id'); } static public function depends_on()