Add support for uploading mediums

This commit is contained in:
Elias Projahn 2021-01-30 17:05:44 +01:00
parent f2d2e1a8a4
commit 2066b9c423
9 changed files with 455 additions and 4 deletions

View file

@ -1,3 +1,9 @@
DROP TABLE tracks;
DROP TABLE track_sets;
DROP TABLE mediums;
DROP TABLE performances;
DROP TABLE recordings;
@ -16,4 +22,5 @@ DROP TABLE instruments;
DROP TABLE persons;
DROP TABLE users;
DROP TABLE users;

View file

@ -67,4 +67,26 @@ CREATE TABLE performances (
person TEXT REFERENCES persons(id),
ensemble TEXT REFERENCES ensembles(id),
role TEXT REFERENCES instruments(id)
);
);
CREATE TABLE mediums (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
discid TEXT,
created_by TEXT NOT NULL REFERENCES users(username)
);
CREATE TABLE track_sets (
id BIGINT NOT NULL PRIMARY KEY,
medium TEXT NOT NULL REFERENCES mediums(id) ON DELETE CASCADE,
index INTEGER NOT NULL,
recording TEXT NOT NULL REFERENCES recordings(id)
);
CREATE TABLE tracks (
id BIGINT NOT NULL PRIMARY KEY,
track_set BIGINT NOT NULL REFERENCES track_sets(id) ON DELETE CASCADE,
index INTEGER NOT NULL,
work_parts TEXT NOT NULL
);