summaryrefslogtreecommitdiff
path: root/database/000_init.sql
diff options
context:
space:
mode:
authorJulien Dessaux2022-10-28 23:51:18 +0200
committerJulien Dessaux2022-10-28 23:51:18 +0200
commit4c42c4fda1616f2fc96bb566e1e2200ea756f0d5 (patch)
treede3e1e095b3e23523fbb837cb5dda613ecdb479c /database/000_init.sql
parentBegan implementing middlewares, session and auth (diff)
downloadjeux-de-mots-4c42c4fda1616f2fc96bb566e1e2200ea756f0d5.tar.gz
jeux-de-mots-4c42c4fda1616f2fc96bb566e1e2200ea756f0d5.tar.bz2
jeux-de-mots-4c42c4fda1616f2fc96bb566e1e2200ea756f0d5.zip
Added a basic database schema and migration function
Diffstat (limited to '')
-rw-r--r--database/000_init.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/database/000_init.sql b/database/000_init.sql
new file mode 100644
index 0000000..b9f4f23
--- /dev/null
+++ b/database/000_init.sql
@@ -0,0 +1,10 @@
+CREATE TABLE schema_version (
+ version INTEGER NOT NULL
+);
+CREATE TABLE users (
+ id INTEGER PRIMARY KEY,
+ username TEXT NOT NULL UNIQUE,
+ hash TEXT,
+ email TEXT,
+ created_at DATE DEFAULT (datetime('now'))
+);