Ticket #429 (closed defect: worksforme)
Altering a column to allow NULL fails with sqlite
|Reported by:||KyleMac||Owned by:||andrew|
Using the following to alter a column to allow a null value:
db.alter_column('shop_order', 'completed_on', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True))
sqlite3.OperationalError: SQL logic error or missing database
The reason for the exception is putting a ‘NULL’ into non NULL column. And SQLite says “missing database”. Way to write the exceptions.
But what this migration is doing is actually the opposite of that, and it even happens with an empty database.
It can be due to the database being locked too but what would cause that? I have alter_columns in preceding and following migrations that are working fine (this one is 10/11).
- Status changed from assigned to infoneeded
- Milestone changed from 0.7.2 to 0.7.3
- Status changed from infoneeded to assigned