Add metadata table

This commit is contained in:
Lukáš Kucharczyk 2022-11-16 10:55:08 +01:00
parent 41362eccf1
commit 90b0c98675
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 8 additions and 2 deletions

View File

@ -10,6 +10,12 @@ CREATE TABLE IF NOT EXISTS "files" (
"path" TEXT,
PRIMARY KEY("id" AUTOINCREMENT)
);
CREATE TABLE IF NOT EXISTS "metadata" (
"fid" INTEGER NOT NULL,
"name" TEXT,
PRIMARY KEY("fid"),
FOREIGN KEY("fid") REFERENCES "files"("id")
);
CREATE TABLE IF NOT EXISTS "tags_ties" (
"fid" INTEGER NOT NULL,
"tid" INTEGER NOT NULL,
@ -19,8 +25,8 @@ CREATE TABLE IF NOT EXISTS "tags_ties" (
);
CREATE TABLE IF NOT EXISTS "hashes" (
"id" INTEGER,
"md5" TEXT,
"fid" INTEGER,
"md5" TEXT NOT NULL,
"fid" INTEGER NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT),
FOREIGN KEY("fid") REFERENCES "files"("id")
);