mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 11:01:48 +02:00
[ticket/12352] Add checks for existing user_pass_convert to migrations
PHPBB3-12352
This commit is contained in:
@@ -25,6 +25,12 @@ class passwords_convert_p1 extends \phpbb\db\migration\migration
|
|||||||
|
|
||||||
public function update_passwords($start)
|
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;
|
$start = (int) $start;
|
||||||
$limit = 1000;
|
$limit = 1000;
|
||||||
$converted_users = 0;
|
$converted_users = 0;
|
||||||
|
@@ -11,6 +11,11 @@ namespace phpbb\db\migration\data\v310;
|
|||||||
|
|
||||||
class passwords_convert_p2 extends \phpbb\db\migration\migration
|
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()
|
static public function depends_on()
|
||||||
{
|
{
|
||||||
return array('\phpbb\db\migration\data\v310\passwords_convert_p1');
|
return array('\phpbb\db\migration\data\v310\passwords_convert_p1');
|
||||||
|
Reference in New Issue
Block a user