From 827ecf9f30b73943e4736043c33578f2b3acdecf Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 16 Jun 2007 14:18:27 +0000 Subject: [PATCH] #11927 git-svn-id: file:///svn/phpbb/trunk@7769 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/install/convertors/functions_phpbb20.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index c624d9d004..3b6679250d 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -281,6 +281,7 @@ p a {
  • [Fix] Overcome Oracle's inability to handle IN() clauses with over one thousand elements (Bug #12449)
  • [Fix] Simulate Firebird's affected rows mechanism for older versions of PHP
  • [Fix] Custom BBCodes properly handle lowercasing of parameterized tags (Bug #12377)
  • +
  • [Fix] Update the forum_id sequence for PostgreSQL during conversion (Bug #11927)
  • diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 5c7bf2f903..ec282c8f46 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -92,8 +92,6 @@ function phpbb_insert_forums() $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' ON'); break; } - - $cats_added = array(); while ($row = $src_db->sql_fetchrow($result)) @@ -281,6 +279,10 @@ function phpbb_insert_forums() switch ($db->sql_layer) { + case 'postgres': + $db->sql_query("SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));'); + break; + case 'mssql': case 'mssql_odbc': $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' OFF');