Closed (fixed)
Project:
Webform
Version:
6.x-3.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Aug 2010 at 04:58 UTC
Updated:
21 Jan 2012 at 19:59 UTC
Jump to comment: Most recent file
Hi there,
after upgrading from 2.x to 3.1 the following error messages appears after running update.php:
* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "excluded_components" contains null values in /xxxxxxxxx/includes/database.pgsql.inc on line 139.
* user warning: query: ALTER TABLE drupal6_webform_emails ALTER excluded_components SET NOT NULL in /xxxxxxxxx/includes/database.pgsql.inc on line 670.and in the area "The following queries werde executed":
Update #6308
* ALTER TABLE {webform_emails} ADD COLUMN excluded_components text
* Failed: ALTER TABLE {webform_emails} ALTER excluded_components SET NOT NULL
* ALTER TABLE {webform_component} DROP COLUMN email
Trying to upgrade from 2.9 and 2.10 throws the same error.
My setting:
Drupal 6.19
Postgres 8.3.11
PHP 5.2.6
regards,
Maschi
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | webform_default_excluded.patch | 1.14 KB | quicksketch |
| #2 | webform_887580.patch | 804 bytes | maschi |
Comments
Comment #1
quicksketchThanks for the report. This sounds like it's probably a PostGres SQL specific problem (since I haven't gotten any other reports like this from the users upgrading so far). We can probably fix this by doing a simple query to set a value of '' (an empty string) where value = NULL before converting the column to NOT NULL.
Comment #2
maschi commentedI have made a patch and upgrade (from 2.9) shows no error anymore.
Output of logfile:
Is it ok?
Comment #3
quicksketchIt may be that all we need is to set a default of "".
Comment #4
maschi commentedYepp, that worked. And is much smarter :o)
Thx!
Comment #5
quicksketchI've committed this patch. Thanks for testing!
Comment #7
artscientific commentedHello gentlemen,
I'm getting a similar webform_emails error trying to go from 2.6 to 3.1 but not using postgres:
"
Drupal database update
user warning: Duplicate column name 'excluded_components' query: ALTER TABLE drup_webform_emails ADD `excluded_components` TEXT DEFAULT NULL in xxxx/includes/database.mysql-common.inc on line 298.
"
The following queries were executed
webform module
"
Update #6308
Failed: ALTER TABLE {webform_emails} ADD `excluded_components` TEXT DEFAULT NULL
UPDATE {webform_emails} SET excluded_components = '%s' ()
ALTER TABLE {webform_emails} CHANGE `excluded_components` `excluded_components` TEXT NOT NULL
ALTER TABLE {webform_component} DROP email
"
Not only does it fail but it brings the whole site down!
Really appreciate any insight or suggestions, I've checked the table and it doesnt appear to be corrupted (even tried to repair it for good measure) ... come to think of it, it wasnt sending messages to the first e-mail address listed at one point, dont know if its related.
Thanks in advance!
Comment #8
quicksketch@artscientific: I'd appreciate you opening a new issue with your description. Let's keep issues that have been closed for over a year closed, this is clearly a new problem (sounds like you've run the same update more than once, so the columns already exist).