diff --git a/migrations/20241115182043_init.up.sql b/migrations/20241115182043_init.up.sql index 1f864a9..7fd7223 100644 --- a/migrations/20241115182043_init.up.sql +++ b/migrations/20241115182043_init.up.sql @@ -1,8 +1,8 @@ -- Add up migration script here CREATE TABLE IF NOT EXISTS records ( id INTEGER NOT NULL PRIMARY KEY, + cache_name TEXT NOT NULL UNIQUE, uploaded TEXT NOT NULL DEFAULT (datetime('now')), - file_path TEXT NOT NULL, downloads INTEGER NOT NULL DEFAULT 0, max_downloads INTEGER NOT NULL ) STRICT; diff --git a/queries/records/increment_download.sql b/queries/records/increment_downloads.sql similarity index 100% rename from queries/records/increment_download.sql rename to queries/records/increment_downloads.sql diff --git a/queries/records/new.sql b/queries/records/new.sql index 0eda865..ac54e0e 100644 --- a/queries/records/new.sql +++ b/queries/records/new.sql @@ -1,2 +1,2 @@ -INSERT INTO records (file_path, max_downloads) +INSERT INTO records (cache_name, max_downloads) VALUES (?, ?);