From 542924d1ab1c114ee21e4edd2d806d48ea113abd Mon Sep 17 00:00:00 2001 From: blissful Date: Mon, 9 Oct 2023 17:24:21 -0400 Subject: [PATCH] add mtimes to data model --- migrations/20231009_01_qlEHa-bootstrap.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migrations/20231009_01_qlEHa-bootstrap.sql b/migrations/20231009_01_qlEHa-bootstrap.sql index db7ea02..0fa7379 100644 --- a/migrations/20231009_01_qlEHa-bootstrap.sql +++ b/migrations/20231009_01_qlEHa-bootstrap.sql @@ -28,6 +28,7 @@ CREATE INDEX releases_release_year ON releases(release_year); CREATE TABLE tracks ( id INTEGER PRIMARY KEY, source_path TEXT NOT NULL UNIQUE, + mtime TIMESTAMP NOT NULL, title TEXT NOT NULL, release_id INTEGER NOT NULL REFERENCES releases(id), track_number TEXT NOT NULL, @@ -76,6 +77,7 @@ CREATE TABLE collections ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, source_path TEXT UNIQUE NOT NULL + mtime TIMESTAMP NOT NULL ); CREATE INDEX collections_source_path ON collections(source_path); @@ -91,7 +93,8 @@ CREATE UNIQUE INDEX collections_releases_collection_position ON collections_rele CREATE TABLE playlists ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, - source_path TEXT UNIQUE NOT NULL + source_path TEXT UNIQUE NOT NULL, + mtime TIMESTAMP NOT NULL ); CREATE INDEX playlists_source_path ON playlists(source_path);