aboutsummaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2017-06-11 13:25:57 +0000
committerFelix Hanley <felix@userspace.com.au>2017-06-11 13:29:15 +0000
commit3185a43420dab2efb85aa601bdfe267e8b2e11f2 (patch)
tree846c21d92f7089e3e43c2fec3dbee90aef938f9b /schema.sql
parent3291eddb975a1df77975d8083599b5f3a85afaba (diff)
downloaddhtsearch-3185a43420dab2efb85aa601bdfe267e8b2e11f2.tar.gz
dhtsearch-3185a43420dab2efb85aa601bdfe267e8b2e11f2.tar.bz2
Add torrent tagging
- Move to postgresql to reduce locking issues - Move ih hash to single thread - Clean up stuff
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql22
1 files changed, 22 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
new file mode 100644
index 0000000..a0acf5b
--- /dev/null
+++ b/schema.sql
@@ -0,0 +1,22 @@
+create table if not exists torrents (
+ id serial not null primary key,
+ infohash character varying(40) unique,
+ size bigint,
+ name text,
+ seen timestamp without time zone
+);
+create table if not exists files (
+ id serial not null primary key,
+ torrent_id integer not null references torrents,
+ path text,
+ size bigint
+);
+create table if not exists tags (
+ id serial not null primary key,
+ name text
+);
+create table if not exists tags_torrents (
+ tag_id integer not null references tags,
+ torrent_id integer not null references torrents,
+ primary key (tag_id, torrent_id)
+);