Closed andrewalker closed 9 years ago
When using SQLite as a backend, the created_date for the post can't be NULL. In MySQL, it uses the default CURRENT_TIMESTAMP.
DBI Exception: DBD::SQLite::st execute failed: NOT NULL constraint failed: post.created_date [for Statement "INSERT INTO post ( content, cover, created_date, slug, status, title, user_id) VALUES ( ?, ?, ?, ?, ?, ?, ? )"] at /Users/anwalker/Projects/PearlBee/local/lib/perl5/DBIx/Class/Schema.pm line 1077.
The DEFAULT CURRENT_TIMESTAMP in SQLite works, unless you explicitly INSERT a NULL value:
DEFAULT CURRENT_TIMESTAMP
INSERT
NULL
http://stackoverflow.com/questions/14461851/how-to-have-an-automatic-timestamp-in-sqlite
When using SQLite as a backend, the created_date for the post can't be NULL. In MySQL, it uses the default CURRENT_TIMESTAMP.
DBI Exception: DBD::SQLite::st execute failed: NOT NULL constraint failed: post.created_date [for Statement "INSERT INTO post ( content, cover, created_date, slug, status, title, user_id) VALUES ( ?, ?, ?, ?, ?, ?, ? )"] at /Users/anwalker/Projects/PearlBee/local/lib/perl5/DBIx/Class/Schema.pm line 1077.