finish implementing database schema
This commit is contained in:
parent
fb4e832fe6
commit
30613f8cb4
1 changed files with 25 additions and 0 deletions
|
|
@ -23,5 +23,30 @@ CREATE TABLE "file" (
|
|||
torrent_id INTEGER NOT NULL,
|
||||
file_name TEXT NOT NULL,
|
||||
|
||||
FOREIGN KEY(torrent_id) REFERENCES "torrent"(id)
|
||||
);
|
||||
|
||||
CREATE TABLE "category" (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
|
||||
title TEXT NOT NULL,
|
||||
forum_id INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "torrent_category" (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
|
||||
torrent_id INTEGER NOT NULL,
|
||||
category_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY(torrent_id) REFERENCES "torrent"(id),
|
||||
FOREIGN KEY(category_id) REFERENCES "category"(id)
|
||||
);
|
||||
|
||||
CREATE TABLE "deletion" (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
|
||||
torrent_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY(torrent_id) REFERENCES "torrent"(id)
|
||||
);
|
||||
Loading…
Add table
Reference in a new issue