diff options
Diffstat (limited to 'pkg/database/sql/000_init.sql')
-rw-r--r-- | pkg/database/sql/000_init.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/database/sql/000_init.sql b/pkg/database/sql/000_init.sql index b635442..e14142b 100644 --- a/pkg/database/sql/000_init.sql +++ b/pkg/database/sql/000_init.sql @@ -14,6 +14,15 @@ CREATE TABLE accounts ( ) STRICT; CREATE UNIQUE INDEX accounts_username on accounts(username); +CREATE TABLE sessions ( + id TEXT PRIMARY KEY, + account_id INTEGER NOT NULL, + created INTEGER NOT NULL DEFAULT (unixepoch()), + updated INTEGER NOT NULL DEFAULT (unixepoch()), + data TEXT NOT NULL, + FOREIGN KEY(account_id) REFERENCES accounts(id) ON DELETE CASCADE +) STRICT; + CREATE TABLE states ( id INTEGER PRIMARY KEY, path TEXT NOT NULL, |