Add metadata table
This commit is contained in:
parent
41362eccf1
commit
90b0c98675
10
database.sql
10
database.sql
|
@ -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")
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue