summaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2013-05-21 20:05:12 +0200
committerSebastian Reichel <sre@ring0.de>2013-05-21 20:05:12 +0200
commitadb1355b272b80cf9904cd0e04c4f26d2528203f (patch)
tree74296ebaf2fb28d88a6b10d3c19b98326e604fa5 /sql
parente3837552b908648316e3e24f586835ad4ded3b1c (diff)
downloadserial-barcode-scanner-adb1355b272b80cf9904cd0e04c4f26d2528203f.tar.bz2
sql: create index
Diffstat (limited to 'sql')
-rw-r--r--sql/tables.sql1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/tables.sql b/sql/tables.sql
index f42e927..194f4f3 100644
--- a/sql/tables.sql
+++ b/sql/tables.sql
@@ -6,4 +6,5 @@ CREATE TABLE IF NOT EXISTS prices (product INTEGER NOT NULL REFERENCES products,
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 supplier(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, city TEXT, postal_code TEXT, street TEXT, phone TEXT, website TEXT);
+CREATE INDEX IF NOT EXISTS invoiceindex ON sales (user ASC, timestamp DESC);
COMMIT;