summaryrefslogtreecommitdiff
path: root/initialize.sql
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-12-20 06:48:51 +0100
committerPřemysl Eric Janouch <p@janouch.name>2023-12-20 20:25:24 +0100
commit38d61556ecc6499b4ea17adf8c57cc84f320b2cd (patch)
treeee7fb0e6e49a3f09e8fd4cab7e021a842d1bb58f /initialize.sql
parentf7ba65726f648a5873620c790feb9a7e2a35d82b (diff)
downloadgallery-38d61556ecc6499b4ea17adf8c57cc84f320b2cd.tar.gz
gallery-38d61556ecc6499b4ea17adf8c57cc84f320b2cd.tar.xz
gallery-38d61556ecc6499b4ea17adf8c57cc84f320b2cd.zip
WIP: FS to DB sync
Diffstat (limited to 'initialize.sql')
-rw-r--r--initialize.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/initialize.sql b/initialize.sql
index 9698c69..c230f18 100644
--- a/initialize.sql
+++ b/initialize.sql
@@ -47,6 +47,15 @@ END;
--
+-- TODO: Add a trigger to delete from here when a node for the sha1 is added.
+CREATE TABLE IF NOT EXISTS orphan(
+ sha1 TEXT NOT NULL REFERENCES image(sha1)
+ path TEXT NOT NULL,
+ PRIMARY KEY (sha1)
+) STRICT;
+
+--
+
CREATE TABLE IF NOT EXISTS tag_space(
id INTEGER NOT NULL,
name TEXT NOT NULL,