aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2017-06-17 13:34:52 +0000
committerFelix Hanley <felix@userspace.com.au>2017-06-17 13:34:52 +0000
commit1b2d55135fc099c85067f566a31128ea3e8823ad (patch)
treee839a1937f3fa9fd464e6249ad36fe2cd42f78a8
parentae07c61044d45e54652ce45dd75bf33ec48aa150 (diff)
downloaddhtsearch-1b2d55135fc099c85067f566a31128ea3e8823ad.tar.gz
dhtsearch-1b2d55135fc099c85067f566a31128ea3e8823ad.tar.bz2
Update schema to reflect development
-rw-r--r--schema.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/schema.sql b/schema.sql
index 5686f23..62ecd66 100644
--- a/schema.sql
+++ b/schema.sql
@@ -7,7 +7,7 @@ create table if not exists torrents (
);
create table if not exists files (
id serial not null primary key,
- torrent_id integer not null references torrents,
+ torrent_id integer not null references torrents on delete cascade,
path text,
size bigint
);
@@ -16,7 +16,7 @@ create table if not exists tags (
name text
);
create table if not exists tags_torrents (
- tag_id integer not null references tags,
- torrent_id integer not null references torrents,
+ tag_id integer not null references tags on delete cascade,
+ torrent_id integer not null references torrents on delete cascade,
primary key (tag_id, torrent_id)
);