summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@wirdorange.org>2011-01-15 20:02:10 +0000
committerOthmar Gsenger <otti@wirdorange.org>2011-01-15 20:02:10 +0000
commitcf30c9d3802a42ce93ce503a617c8511a2211d13 (patch)
tree8be58a6379dbd053fe7c722445c6f9179df5521e
parentbetter error message on invalid xml in log xml::roc (diff)
added db structure
-rw-r--r--Readme5
-rw-r--r--create_db.sql4
2 files changed, 9 insertions, 0 deletions
diff --git a/Readme b/Readme
new file mode 100644
index 0000000..3655f7c
--- /dev/null
+++ b/Readme
@@ -0,0 +1,5 @@
+
+
+Dump Database Structure:
+
+sudo -u www-data echo '.dump' | sqlite3 /srv/nzbget/datenbank.sqlite | grep CREATE
diff --git a/create_db.sql b/create_db.sql
new file mode 100644
index 0000000..e0fade0
--- /dev/null
+++ b/create_db.sql
@@ -0,0 +1,4 @@
+CREATE TABLE download(download_id INTEGER PRIMARY KEY ASC,owner INTEGER, size INTEGER, time DATETIME DEFAULT CURRENT_TIMESTAMP, category INTEGER, name text, description text, completed BOOL DEFAULT FALSE);
+CREATE TABLE category (category_id INTEGER PRIMARY KEY ASC, name text);
+CREATE TABLE owner (owner_id INTEGER PRIMARY KEY ASC, name text, quoata INTEGER DEFAULT 100000, quota_used INTEGER DEFAULT 0);
+CREATE TABLE seen ( seen_id INTEGER PRIMARY KEY ASC , download INTEGER , user INTEGER);