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 );