[ticket/17528] Fix migration issue using postgres

PHPBB-17528
This commit is contained in:
Marc Alexander 2025-07-05 09:36:53 +02:00 committed by rxu
parent 53360e0c17
commit 4f89e2b97d
No known key found for this signature in database
GPG key ID: 955F0567380E586A

View file

@ -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'] . '
SET ' . $this->db->sql_build_array('UPDATE', ['method' => 'notification.method.email']) . "
WHERE method = 'notification.method.jabber'";
$this->db->sql_query_limit($sql, $limit, $start ?: 0);
return $this->db->sql_affectedrows() < $limit ? true : $start + $limit;
$this->db->sql_query($sql);
}
}