db, types: add a credentials column for keys a token made

No released version made keys from tokens, so existing rows stay false.
This commit is contained in:
Kristoffer Dalby committed 2026-10-27 21:32:34 +00:00
1 parent a129c73838
commit 8f4e63bf8e
8 files changed
+137 -87

No files matched your search

+1
View File
@@ -60,6 +60,7 @@ CREATE TABLE credentials(
created_at datetime,
expiration datetime,
revoked datetime,
created_by_token numeric DEFAULT false,
CONSTRAINT fk_credentials_user FOREIGN KEY(user_id) REFERENCES users(id) ON DELETE SET NULL,
CONSTRAINT chk_credentials_hash CHECK(hash IS NOT NULL OR revoked IS NOT NULL),