diff options
Diffstat (limited to '')
-rw-r--r-- | src/storage/video_database/schema.sql | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/storage/video_database/schema.sql b/src/storage/video_database/schema.sql index b05d908..3afd091 100644 --- a/src/storage/video_database/schema.sql +++ b/src/storage/video_database/schema.sql @@ -8,7 +8,8 @@ -- You should have received a copy of the License along with this program. -- If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. --- The base schema +-- All tables should be declared STRICT, as I actually like to have types checking (and a +-- db that doesn't lie to me). -- Keep this table in sync with the `Video` structure CREATE TABLE IF NOT EXISTS videos ( @@ -18,7 +19,7 @@ CREATE TABLE IF NOT EXISTS videos ( 1 END), description TEXT, - duration FLOAT, + duration REAL, extractor_hash TEXT UNIQUE NOT NULL PRIMARY KEY, last_status_change INTEGER NOT NULL, parent_subscription_name TEXT, @@ -39,7 +40,7 @@ CREATE TABLE IF NOT EXISTS videos ( thumbnail_url TEXT, title TEXT NOT NULL, url TEXT UNIQUE NOT NULL -); +) STRICT; -- Store additional metadata for the videos marked to be watched CREATE TABLE IF NOT EXISTS video_options ( @@ -47,10 +48,10 @@ CREATE TABLE IF NOT EXISTS video_options ( subtitle_langs TEXT NOT NULL, playback_speed REAL NOT NULL, FOREIGN KEY(extractor_hash) REFERENCES videos (extractor_hash) -); +) STRICT; -- Store subscriptions CREATE TABLE IF NOT EXISTS subscriptions ( name TEXT UNIQUE NOT NULL PRIMARY KEY, url TEXT NOT NULL -); +) STRICT; |