Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17507

General SQL error on installing remove_jabber.php migration with PostgreSQL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.0.0-a1
    • Migrations
    • None

      Updating development installation of master branch to the latest code using PostgreSQL causes general error thrown in installer:

      General Error:SQL ERROR [ postgres ]ERROR: syntax error (at or near: "LIMIT") LINE 4: LIMIT 1000 OFFSET 0 ^ []SQLUPDATE phpbb_user_notifications SET method = 'notification.method.email' WHERE method = 'notification.method.jabber' LIMIT 1000 OFFSET 0 in file G:\htdocs\44\phpbb\db\driver\driver.php on line 1094
      

      The error comes from \phpbb\db\migration\data\v400\remove_jabber.php migration, method public function move_jabber_to_email_notifications(int|null $start).

      This is because PostgreSQL UPDATE does not support LIMIT clause, see https://www.postgresql.org/docs/current/sql-update.html (at the bottom of the page):

      While there is no LIMIT clause for UPDATE, it is possible to get a similar effect through the use of a Common Table Expression and a self-join.

            Unassigned Unassigned
            rxu rxu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: