aboutsummaryrefslogtreecommitdiff
path: root/db/scripts/water_init.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/scripts/water_init.sql')
-rw-r--r--db/scripts/water_init.sql10
1 files changed, 5 insertions, 5 deletions
diff --git a/db/scripts/water_init.sql b/db/scripts/water_init.sql
index d7b912a..0751c41 100644
--- a/db/scripts/water_init.sql
+++ b/db/scripts/water_init.sql
@@ -1,13 +1,13 @@
1-- user table for users. 1-- user table for users.
2CREATE TABLE IF NOT EXISTS Users ( 2CREATE TABLE IF NOT EXISTS Users (
3 id INT PRIMARY KEY, 3 id INTEGER PRIMARY KEY,
4 name TEXT NOT NULL, 4 name TEXT NOT NULL,
5 UNIQUE(name) 5 UNIQUE(name)
6); 6);
7 7
8-- statistics table for users to log their consumption 8-- statistics table for users to log their consumption
9CREATE TABLE IF NOT EXISTS Statistics ( 9CREATE TABLE IF NOT EXISTS Statistics (
10 id INT PRIMARY KEY, 10 id INTEGER PRIMARY KEY,
11 date DATETIME NOT NULL, 11 date DATETIME NOT NULL,
12 user_id INT NOT NULL, 12 user_id INT NOT NULL,
13 quantity INT 13 quantity INT
@@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS Statistics (
15 15
16-- preferences table for a user. 16-- preferences table for a user.
17CREATE TABLE IF NOT EXISTS Preferences ( 17CREATE TABLE IF NOT EXISTS Preferences (
18 id INT PRIMARY KEY, 18 id INTEGER PRIMARY KEY,
19 color TEXT NOT NULL DEFAULT "#000000", 19 color TEXT NOT NULL DEFAULT "#000000",
20 user_id INT NOT NULL, 20 user_id INT NOT NULL,
21 size_id INT NOT NULL DEFAULT 1, 21 size_id INT NOT NULL DEFAULT 1,
@@ -25,8 +25,8 @@ CREATE TABLE IF NOT EXISTS Preferences (
25 25
26-- lookup table for sizes. 26-- lookup table for sizes.
27CREATE TABLE IF NOT EXISTS Sizes ( 27CREATE TABLE IF NOT EXISTS Sizes (
28 id INT PRIMARY KEY, 28 id INTEGER PRIMARY KEY,
29 size INT NOT NULL 29 size INT NOT NULL,
30 unit TEXT DEFAULT "oz" 30 unit TEXT DEFAULT "oz"
31); 31);
32 32