10 lines
315 B
MySQL
10 lines
315 B
MySQL
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- noqa: RF05
|
||
|
|
||
|
CREATE TABLE sessions (
|
||
|
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||
|
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
|
||
|
);
|