Files
Dune/drizzle/0000_flashy_medusa.sql
T
2026-09-08 07:37:52 +10:00

14 lines
395 B
SQL

CREATE TABLE `rooms` (
`code` text PRIMARY KEY NOT NULL,
`state` text NOT NULL,
`version` integer DEFAULT 0 NOT NULL,
`updated_at` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE `seats` (
`token_hash` text PRIMARY KEY NOT NULL,
`room_code` text NOT NULL,
`player_id` text NOT NULL,
FOREIGN KEY (`room_code`) REFERENCES `rooms`(`code`) ON UPDATE no action ON DELETE cascade
);