mabel/migrations/20230630080241_add-sessions.up.sql

10 lines
288 B
MySQL
Raw Normal View History

2023-06-30 13:02:20 +00:00
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- noqa: RF05
CREATE TABLE sessions (
2023-07-13 15:43:05 +00:00
id UUID PRIMARY KEY,
2023-06-30 13:02:20 +00:00
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
);