mabel/migrations/20230630080241_add-sessions.up.sql
Hamcha 81134dc0dd
Some checks failed
continuous-integration/drone/push Build is failing
add cursor and move to uuidv7
2023-07-13 17:43:05 +02:00

9 lines
288 B
SQL

CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- noqa: RF05
CREATE TABLE sessions (
id UUID PRIMARY KEY,
actor UUID NOT NULL REFERENCES users (id) ON DELETE CASCADE,
secret VARCHAR NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now(),
expires_at TIMESTAMP NOT NULL
);