summaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2015-02-14 22:53:22 +0100
committerSebastian Reichel <sre@ring0.de>2015-02-14 23:42:09 +0100
commitd2f7ccfd1bab830e7758b3af4a70dc31e64327f3 (patch)
tree5c56e8082df85ddcaf009c1d20782d306e385acc /sql
parent06c4d13da6267d9c5698bec9521c76e3efdb1efa (diff)
downloadserial-barcode-scanner-d2f7ccfd1bab830e7758b3af4a70dc31e64327f3.tar.bz2
web: more detailed authentication system
Diffstat (limited to 'sql')
-rw-r--r--sql/tables.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/tables.sql b/sql/tables.sql
index 4a40d4d..a81d60c 100644
--- a/sql/tables.sql
+++ b/sql/tables.sql
@@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS sales (user INTEGER NOT NULL REFERENCES users, produc
CREATE TABLE IF NOT EXISTS restock (user INTEGER NOT NULL REFERENCES users, product INTEGER NOT NULL REFERENCES products, amount INTEGER NOT NULL DEFAULT 0, timestamp INTEGER NOT NULL DEFAULT 0, price INTEGER NOT NULL DEFAULT 0, supplier INTEGER, best_before_date INTEGER);
CREATE TABLE IF NOT EXISTS prices (product INTEGER NOT NULL REFERENCES products, valid_from INTEGER NOT NULL DEFAULT 0, memberprice INTEGER NOT NULL DEFAULT 0, guestprice INTEGER NOT NULL DEFAULT 0);
CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY NOT NULL, email TEXT, firstname TEXT NOT NULL, lastname TEXT NOT NULL, gender TEXT, street TEXT, plz INTEGER, city TEXT, pgp TEXT);
-CREATE TABLE IF NOT EXISTS authentication(user INTEGER PRIMARY KEY NOT NULL REFERENCES users, password TEXT, session CHARACTER(20), superuser BOOLEAN NOT NULL DEFAULT 0, disabled BOOLEAN NOT NULL DEFAULT 0);
+CREATE TABLE IF NOT EXISTS authentication(user INTEGER PRIMARY KEY NOT NULL REFERENCES users, password TEXT, session CHARACTER(20), superuser BOOLEAN NOT NULL DEFAULT 0, auth_users BOOLEAN NOT NULL DEFAULT 0, auth_products BOOLEAN NOT NULL DEFAULT 0, auth_cashbox BOOLEAN NOT NULL DEFAULT 0, disabled BOOLEAN NOT NULL DEFAULT 0);
CREATE TABLE IF NOT EXISTS supplier(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, city TEXT, postal_code TEXT, street TEXT, phone TEXT, website TEXT);
CREATE TABLE IF NOT EXISTS cashbox_diff(id INTEGER PRIMARY KEY AUTOINCREMENT, user INTEGER NOT NULL REFERENCES users, amount INTEGER NOT NULL, timestamp INTEGER NOT NULL DEFAULT 0);
CREATE INDEX IF NOT EXISTS invoiceindex ON sales (user ASC, timestamp DESC);