Comment #3 by m.t.pekkarinen:
The patch in comment 1 fixes the bug for null fields, but adding a field
with
null=True no longer works: I get an error
Error applying evolution: TEMP_TABLE.<fieldname> may not be NULL
The attached new patch fixes this for me: when a null field is added and no
initial
value is given, do as chipx explains in comment 1. Otherwise, do what the
code
already does in r164.
The minimal changes fix the problem, but the code is far too clever to my
taste.
The trick "make 2 references to a list so that appending to one of them
modifies
both and then SELECT with non-existent column name, which populates the
TEMP_TABLE
column with the column's name and then overwrite that with the initial
value" seems
more like an accident than a propely thought out way to get the correct
result.
Attachments:
sqlite3_add_field_fix2.diff 1.1 KB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Here's the correct fix for null fields, plus the original fix (plus a
modification
because the original caused a new bug with renaming fields), and all tests
updated.
Attachments:
sqlite_add_field_easy_fix.diff 84.2 KB