diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-05-31 14:56:03 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-06-01 21:31:05 +0200 |
commit | 306beab4cba155a933391c40c75f5dd9c57fd69e (patch) | |
tree | 2a5062713aa0b70498b788afb98dff39184f39b8 /phpBB/phpbb/db/migration/data | |
parent | 4698f6928e44a24a7a10ff8b4fed2c1a24cab338 (diff) | |
download | forums-306beab4cba155a933391c40c75f5dd9c57fd69e.tar forums-306beab4cba155a933391c40c75f5dd9c57fd69e.tar.gz forums-306beab4cba155a933391c40c75f5dd9c57fd69e.tar.bz2 forums-306beab4cba155a933391c40c75f5dd9c57fd69e.tar.xz forums-306beab4cba155a933391c40c75f5dd9c57fd69e.zip |
[ticket/12352] Add checks for existing user_pass_convert to migrations
PHPBB3-12352
Diffstat (limited to 'phpBB/phpbb/db/migration/data')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php index 24af20cf5c..a0c7c7eb75 100644 --- a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php +++ b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php @@ -25,6 +25,12 @@ class passwords_convert_p1 extends \phpbb\db\migration\migration public function update_passwords($start) { + // Nothing to do if user_pass_convert column doesn't exist + if (!$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_pass_convert')) + { + return; + } + $start = (int) $start; $limit = 1000; $converted_users = 0; diff --git a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php index 3a7d3d2169..e7d5e4e157 100644 --- a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php +++ b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php @@ -11,6 +11,11 @@ namespace phpbb\db\migration\data\v310; class passwords_convert_p2 extends \phpbb\db\migration\migration { + public function effectively_installed() + { + return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_pass_convert'); + } + static public function depends_on() { return array('\phpbb\db\migration\data\v310\passwords_convert_p1'); |