Aug 13, 2015
0
Level 2
DatabaseMigration trait fails with SQLite on alter table
I'm using :inmemory: SQLite driver, and it was all working fine until I added a non-nullable field
I'm getting the following error:
Cannot add a NOT NULL column with default value NULL (SQL: alter table "stores" add column "mall_id" integer not null)
This would be pretty obvious if my table already had rows, you can't add a non-null column without a default value if you already has rows in the table.
But :inmemory: SQLite doens't have any row: there is no seeder, there is no factory, nothing. Why am I getting this error?
Please or to participate in this conversation.