[drupal-devel] [bug] Upgrade from 4.4 to 4.5.1 creates incorrect
columns in menu table when using PostgreSQL
Cvbge
drupal-devel at drupal.org
Tue Aug 16 17:44:49 UTC 2005
Issue status update for
http://drupal.org/node/14928
Post a follow up:
http://drupal.org/project/comments/add/14928
Project: Drupal
Version: 4.5.5
Component: postgresql database
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: Anonymous
Updated by: Cvbge
Status: patch (ready to be committed)
The patch also applies to 4-6 and HEAD, please apply.
Cvbge
Previous comments:
------------------------------------------------------------------------
Thu, 30 Dec 2004 05:30:15 +0000 : Anonymous
Attachment: http://drupal.org/files/issues/updates.inc_2.patch (956 bytes)
I just upgraded my installation from 4.4 to 4.5.1 and got these errors
when trying to administer the image module:
pg_query(): query failed: ERROR: invalid input syntax for integer
They were all for the menu table. On investigation, i found this in
database/updates.inc:
if ($GLOBALS['db_type'] == 'mysql') {
$ret[] = update_sql("ALTER TABLE {menu} ADD description
varchar(255) DEFAULT '' NOT NULL");
}
else {
$ret[] = update_sql("ALTER TABLE {menu} ADD description smallint");
$ret[] = update_sql("ALTER TABLE {menu} ALTER COLUMN description
SET DEFAULT '0'");
$ret[] = update_sql("UPDATE {menu} SET description = '0'");
$ret[] = update_sql("ALTER TABLE {menu} ALTER COLUMN description
SET NOT NULL");
}
WTH??? How is a smallint on other databases equivalent to varchar on
mysql? Attached is a patch to fix the updates.inc file.
------------------------------------------------------------------------
Tue, 09 Aug 2005 02:17:33 +0000 : gordon
should be marked as patch
------------------------------------------------------------------------
Tue, 16 Aug 2005 17:40:23 +0000 : Cvbge
Attachment: http://drupal.org/files/issues/updates.inc-4.5.diff (1 KB)
True, updated patch for latest 4-5 (although now it's a bit late for
4.5...)
More information about the drupal-devel
mailing list