From 4c42c4fda1616f2fc96bb566e1e2200ea756f0d5 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 28 Oct 2022 23:51:18 +0200 Subject: Added a basic database schema and migration function --- database/000_init.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 database/000_init.sql (limited to 'database/000_init.sql') 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')) +); -- cgit v1.2.3