Skip to content

Commit

Permalink
add mtimes to data model
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Oct 9, 2023
1 parent 3e9aaed commit dcd6dbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion migrations/20231009_01_qlEHa-bootstrap.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
source_mtime TIMESTAMP NOT NULL,
title TEXT NOT NULL,
release_id INTEGER NOT NULL REFERENCES releases(id),
track_number TEXT NOT NULL,
Expand Down Expand Up @@ -76,6 +77,7 @@ CREATE TABLE collections (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
source_path TEXT UNIQUE NOT NULL
source_mtime TIMESTAMP NOT NULL
);
CREATE INDEX collections_source_path ON collections(source_path);

Expand All @@ -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,
source_mtime TIMESTAMP NOT NULL
);
CREATE INDEX playlists_source_path ON playlists(source_path);

Expand Down

0 comments on commit dcd6dbc

Please sign in to comment.