Several upgrade path tests return the following error
Failed: PDOException: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "signature_format" violates not-null constraint: UPDATE simpletest335746users SET signature_format=:db_update_placeholder_0 WHERE (signature = :db_condition_placeholder_0) AND (signature_format = :db_condition_placeholder_1) ; Array ( [target] => default [return] => 2 [already_prepared] => 1 ) in user_update_7010() (line 663 of /home/stevel/drupal/d7/modules/user/user.install).
The field should be marked NULL as per a previous update function, but the postgresql driver does not account for the change.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 974250-postgresql-changefield-null-newlinefix.patch | 1.08 KB | Stevel |
| #1 | postgresql-changefield-null.patch | 1.08 KB | Stevel |
| postgresql-changefield-null.patch | 1.88 KB | Stevel |
Comments
Comment #1
Stevel commentedOld code was left in previous patch, reroll
Comment #2
Stevel commentedReflecting the consequence of this bug
Comment #3
Stevel commentedRemoved superflous newline, no other changes
Comment #4
damien tournoud commentedThis patch adds another missing bit to changeField() on PostgreSQL: handling of NULL / not NULL values.
I asked Stevel to check the behavior of PostgreSQL when the column is already NULL or NOT NULL, and it is a no-operation and doesn't trigger and error. Looks good to go.
Comment #5
dries commentedThis looks good. Committed to CVS HEAD. Thanks.