From df3a71a43213d16f7ea9c9a112e8110ea02e6633 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 18 Jul 2023 16:53:02 -0400 Subject: [PATCH] fix(migrations/sqlite)!: add default for sqlite asset/relation created_at the init migration for sqllite did not specify a default for the created_at column in both `asset` and `relation` tables. This adds this to the migration scripts to resolve this bug. --- migrations/sqlite3/001_schema_init.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/sqlite3/001_schema_init.sql b/migrations/sqlite3/001_schema_init.sql index d86772f..053a3f2 100644 --- a/migrations/sqlite3/001_schema_init.sql +++ b/migrations/sqlite3/001_schema_init.sql @@ -5,13 +5,13 @@ PRAGMA foreign_keys = ON; CREATE TABLE IF NOT EXISTS assets( id INTEGER PRIMARY KEY, - created_at DATETIME, + created_at DATETIME DEFAULT CURRENT_TIMESTAMP, type TEXT, content TEXT); CREATE TABLE IF NOT EXISTS relations( id INTEGER PRIMARY KEY, - created_at DATETIME, + created_at DATETIME DEFAULT CURRENT_TIMESTAMP, type TEXT, from_asset_id INTEGER, to_asset_id INTEGER,