From 5c662ba71618018dae455dc3f3ed7af4babbdc58 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 15 Nov 2024 22:33:30 -0800 Subject: [PATCH] breaking: uploaded defaults to datetime('now') sneaky not null id --- migrations/20241115182043_init.up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/20241115182043_init.up.sql b/migrations/20241115182043_init.up.sql index 2464da2..1f864a9 100644 --- a/migrations/20241115182043_init.up.sql +++ b/migrations/20241115182043_init.up.sql @@ -1,7 +1,7 @@ -- Add up migration script here CREATE TABLE IF NOT EXISTS records ( - id INTEGER PRIMARY KEY, - uploaded TEXT NOT NULL, + id INTEGER NOT NULL PRIMARY KEY, + uploaded TEXT NOT NULL DEFAULT (datetime('now')), file_path TEXT NOT NULL, downloads INTEGER NOT NULL DEFAULT 0, max_downloads INTEGER NOT NULL