summaryrefslogtreecommitdiff
path: root/migrations/20241005020958_token.sql
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/20241005020958_token.sql')
-rw-r--r--migrations/20241005020958_token.sql19
1 files changed, 19 insertions, 0 deletions
diff --git a/migrations/20241005020958_token.sql b/migrations/20241005020958_token.sql
new file mode 100644
index 0000000..046638a
--- /dev/null
+++ b/migrations/20241005020958_token.sql
@@ -0,0 +1,19 @@
+create table token (
+ id text
+ not null
+ primary key,
+ secret text
+ not null
+ unique,
+ login text
+ not null,
+ issued_at text
+ not null,
+ last_used_at text
+ not null,
+ foreign key (login)
+ references login (id)
+);
+
+create index token_issued_at
+on token (issued_at);