wrbapp-next/server/migrations/003_create_sessions.sql

8 lines
297 B
MySQL
Raw Normal View History

2025-02-03 09:34:30 +01:00
CREATE TABLE "sessions" (
session_id uuid NOT NULL PRIMARY KEY,
user_id uuid NOT NULL REFERENCES users (user_id) ON UPDATE cascade ON DELETE cascade,
token text NOT NULL UNIQUE,
expires_at timestamptz NOT NULL,
created_at timestamptz NOT NULL
);