Open vindarel opened 2 years ago
Hi,
Say I add a field to my model:
(due-date :col-type :timestamp :initform (local-time:timestamp+ (local-time:now) 60 :days) :accessor due-date)
When I run Mito's migrations, I get
Error while resetting an sqlite statement. Code CONSTRAINT: NOT NULL constraint failed: contact_copies.due_date. Database: /home/vince/projets/openbookstore/openbookstore/db.db SQL: INSERT INTO "contact_copies" ("book_id", "contact_id", "created_at", "id", "max_time", "quantity", "updated_at") SELECT "book_id", "contact_id", "created_at", "id", "max_time", "quantity", "updated_at" FROM "contact_copies1414"
Solution 1: I could change the col type and make it be (or :null :timestamp).
(or :null :timestamp)
Wouldn't it be nice if we had a restart that asked for a default, or maybe even use the initform as a default?
I think it works on MySQL/PostgreSQL, but seems not on SQLite3. Should be fixed.
Should be fixed by https://github.com/fukamachi/mito/pull/97 Not in quicklisp yet.
Hi,
Say I add a field to my model:
When I run Mito's migrations, I get
Solution 1: I could change the col type and make it be
(or :null :timestamp)
.Wouldn't it be nice if we had a restart that asked for a default, or maybe even use the initform as a default?