Upgrade procedure on PostgreSQL is broken

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
MasterMind2k
Registered User
Posts: 7
Joined: Mon Apr 06, 2015 7:36 pm

Upgrade procedure on PostgreSQL is broken

Post by MasterMind2k »

Hi.

I am trying to upgrade phpbb 3.2.11 to 3.3.14 on PostgreSQL 9.1 server. I've encountered the following error:

Code: Select all

PHP Fatal error:  SQL ERROR [ postgres ]<br /><br />ERROR:  relation "phpbb_migrations" already exists []<br /><br />An SQL error occurred while fetching this page. Please contact the <a href="mailto:[email protected]">Board Administrator</a> if this problem persists. in /var/www/podnapisi/forum/phpbb/db/driver/driver.php on line 1031
Applying following patch fixes the problem:

Code: Select all

commit f9ff7c2f0260688e3c8445684b9f38579af2c9c1 (HEAD -> upgrade-phpbb)
Author: Gregor Kališnik <[email protected]>
Date:   Sat Jan 4 13:49:07 2025 +0000

    Allow migration to finish

diff --git a/docker/phpbb/forum/phpbb/db/tools/postgres.php b/docker/phpbb/forum/phpbb/db/tools/postgres.php
index 2074dbc9..26cb5896 100644
--- a/docker/phpbb/forum/phpbb/db/tools/postgres.php
+++ b/docker/phpbb/forum/phpbb/db/tools/postgres.php
@@ -105,7 +105,7 @@ class postgres extends tools
                        SELECT * FROM information_schema.tables
                                WHERE table_schema = 'public'
                                        AND table_name   = '" . $this->db->sql_escape($table_name) . "'
-                       ) AS INTEGER)";
+                       ) AS INTEGER) AS exists";
                $result = $this->db->sql_query_limit($sql, 1);
                $row = $this->db->sql_fetchrow($result);
                $table_exists = (booL) $row['exists'];
Thank you!
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6518
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Upgrade procedure on PostgreSQL is broken

Post by thecoalman »

Tickets can be submitted to bug tracker: https://tracker.phpbb.com/secure/Dashboard.jspa
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

Return to “[3.3.x] Support Forum”