From 99adbd4ea469399782f89da68d20299f71e8062d Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Sat, 16 Nov 2024 05:13:28 -0800 Subject: [PATCH] breaking: cache_name on records table --- migrations/20241115182043_init.up.sql | 2 +- .../records/{increment_download.sql => increment_downloads.sql} | 0 queries/records/new.sql | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename queries/records/{increment_download.sql => increment_downloads.sql} (100%) 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 (?, ?);