[ticket/12352] Add checks for existing user_pass_convert to migrations

PHPBB3-12352
This commit is contained in:
Marc Alexander 2014-05-31 14:56:03 +02:00
parent 4698f6928e
commit 306beab4cb
2 changed files with 11 additions and 0 deletions

View file

@ -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;

View file

@ -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');