mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-17 07:28:56 +00:00
[ticket/17528] Fix migration issue using postgres
PHPBB-17528
This commit is contained in:
parent
53360e0c17
commit
4f89e2b97d
1 changed files with 2 additions and 6 deletions
|
@ -101,15 +101,11 @@ class remove_jabber extends migration
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function move_jabber_to_email_notifications(int|null $start)
|
public function move_jabber_to_email_notifications()
|
||||||
{
|
{
|
||||||
$limit = 1000;
|
|
||||||
|
|
||||||
$sql = 'UPDATE ' . $this->tables['user_notifications'] . '
|
$sql = 'UPDATE ' . $this->tables['user_notifications'] . '
|
||||||
SET ' . $this->db->sql_build_array('UPDATE', ['method' => 'notification.method.email']) . "
|
SET ' . $this->db->sql_build_array('UPDATE', ['method' => 'notification.method.email']) . "
|
||||||
WHERE method = 'notification.method.jabber'";
|
WHERE method = 'notification.method.jabber'";
|
||||||
$this->db->sql_query_limit($sql, $limit, $start ?: 0);
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
return $this->db->sql_affectedrows() < $limit ? true : $start + $limit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue