When installing 6.x-1.8 I have noticed the following warnings:
* warning: pg_query(): Query failed: ERROR: column "detailed_question" contains null values in /srv/www/htdocs/includes/database.pgsql.inc on line 139.
* user warning: query: ALTER TABLE faq_questions ALTER detailed_question SET NOT NULL in /srv/www/htdocs/includes/database.pgsql.inc on line 697.
I'm running against a PostgreSQL database, but when I see:
The following queries were executed
faq module
Update #6003
* ALTER TABLE {faq_questions} ADD COLUMN detailed_question text
* Failed: ALTER TABLE {faq_questions} ALTER detailed_question SET NOT NULL
* UPDATE {faq_questions} SET detailed_question = question
I would think it is better to first do the UPDATE, and then SET NOT NULL, regardless of the RDBMS.
Comments
Comment #1
stella commentedHmm I'm not sure this is a faq module problem. Update #6003 does the following:
So it uses Drupal's
db_add_field()function to add the field. I can't change the order, as (a) the column has to exist before I can set its contents and (b) the set not null is actually done in db_add_field(). This might be more of an issue for Drupal.Cheers,
Stella