Files
Dune/drizzle/0001_fancy_king_cobra.sql
2026-09-08 07:37:52 +10:00

18 lines
629 B
SQL

CREATE TABLE `seat_recovery_keys` (
`room_code` text NOT NULL,
`player_id` text NOT NULL,
`recovery_hash` text NOT NULL,
PRIMARY KEY(`room_code`, `player_id`),
FOREIGN KEY (`room_code`) REFERENCES `rooms`(`code`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE TABLE `seat_recovery_receipts` (
`room_code` text NOT NULL,
`player_id` text NOT NULL,
`operation_hash` text NOT NULL,
`recovery_hash` text NOT NULL,
`session_hash` text NOT NULL,
PRIMARY KEY(`room_code`, `player_id`, `operation_hash`),
FOREIGN KEY (`room_code`) REFERENCES `rooms`(`code`) ON UPDATE no action ON DELETE cascade
);