From aed280239e643e9f7616969a4a005b6a0fb26834 Mon Sep 17 00:00:00 2001 From: Sebastien DUMETZ Date: Mon, 1 Jul 2024 08:26:24 +0200 Subject: [PATCH] example prototype of collections entries in database --- source/server/migrations/005-collections.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 source/server/migrations/005-collections.sql diff --git a/source/server/migrations/005-collections.sql b/source/server/migrations/005-collections.sql new file mode 100644 index 00000000..25d37ddf --- /dev/null +++ b/source/server/migrations/005-collections.sql @@ -0,0 +1,16 @@ +-------------------------------------------------------------------------------- +-- Up +-------------------------------------------------------------------------------- + +CREATE TABLE collections( + name TEXT NOT NULL, + fk_scene_id INTEGER NOT NULL, + FOREIGN KEY(fk_scene_id) REFERENCES scenes(scene_id), + UNIQUE(name, fk_scene_id) +); + +-------------------------------------------------------------------------------- +-- Down +-------------------------------------------------------------------------------- + +DROP TABLE collections; \ No newline at end of file