Skip to content

Commit

Permalink
fix(migrations/sqlite)!: add default for sqlite asset/relation create…
Browse files Browse the repository at this point in the history
…d_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.
  • Loading branch information
rynmrtn authored Jul 18, 2023
1 parent 901045b commit df3a71a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migrations/sqlite3/001_schema_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit df3a71a

Please sign in to comment.