ezidam/crates/database/migrations/20230318135414_refresh_tokens.up.sql

13 lines
326 B
SQL

create table if not exists refresh_tokens
(
-- info
token TEXT not null primary key,
ip_address TEXT not null,
user TEXT not null references users (id),
-- timings
created_at TEXT not null default CURRENT_TIMESTAMP,
expires_at TEXT not null,
used_at TEXT,
revoked_at TEXT
);