mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/12352] Add checks for existing user_pass_convert to migrations
PHPBB3-12352
This commit is contained in:
parent
4698f6928e
commit
306beab4cb
2 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue