Jump to:
| Project: | Webform |
| Version: | 5.x-2.1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When running upgrade script, the following error :
# warning: pg_query(): Query failed: ERROR: syntax error at or near "(" at character 44 in /srv/www/htdocs/drupal/includes/database.pgsql.inc on line 125.
# user warning: query: ALTER TABLE webform_component ADD email int(1) UNSIGNED NOT NULL DEFAULT '0' in /srv/www/htdocs/drupal/includes/database.pgsql.inc on line 144.
# warning: pg_query(): Query failed: ERROR: column "email" of relation "webform_component" does not exist at character 30 in /srv/www/htdocs/drupal/includes/database.pgsql.inc on line 125.
# user warning: query: UPDATE webform_component SET email = 1 in /srv/www/htdocs/drupal/includes/database.pgsql.inc on line 144.
UNSIGNED is not a keyword in postgres and a size is not accepted for an int datatype when creating a table.
So, changing line 697 of webform.install from
$ret[] = update_sql("ALTER TABLE {webform_component} ADD email int(1) UNSIGNED NOT NULL DEFAULT '0'");
to
$ret[] = update_sql("ALTER TABLE {webform_component} ADD email int NOT NULL DEFAULT '0'");
fixed the problem for postgres. There will have to be separate functions or something for mysql vs postgres
Comments
#1
Thanks, I've updated the query as you recommend. It's a Drupal 5 specific problem, now that SchemaAPI is handling this for us thankfully in Drupal 6.
--project followup subject--
Automatically closed -- issue fixed for two weeks with no activity.
#2
Automatically closed -- issue fixed for two weeks with no activity.