diff options
| author | xengineering <me@xengineering.eu> | 2026-06-22 20:09:08 +0200 |
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2026-06-22 20:10:50 +0200 |
| commit | 56dd6588503908d9a562445c1cb6a99c2a7aa415 (patch) | |
| tree | 94cc4009ccbeaca0cfcbc2733e1ced63e78dcb33 /sql | |
| parent | a4535e0aa3e103f87bae6c3f1a1527588e60208c (diff) | |
| download | finserv-56dd6588503908d9a562445c1cb6a99c2a7aa415.tar finserv-56dd6588503908d9a562445c1cb6a99c2a7aa415.tar.zst finserv-56dd6588503908d9a562445c1cb6a99c2a7aa415.zip | |
sql: migrations: Add 0003.sqlite3
This adds persistence for tokens.
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/migrations/0003.sqlite3 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/migrations/0003.sqlite3 b/sql/migrations/0003.sqlite3 new file mode 100644 index 0000000..79f7516 --- /dev/null +++ b/sql/migrations/0003.sqlite3 @@ -0,0 +1,12 @@ +PRAGMA user_version = 3; + +CREATE TABLE tokens ( + id INTEGER PRIMARY KEY, + user_id INTEGER NOT NULL, + token TEXT NOT NULL, + created_at DATETIME NOT NULL DEFAULT (datetime('now')), + + FOREIGN KEY (user_id) REFERENCES users(id) + ON DELETE CASCADE + ON UPDATE CASCADE +); |
