23 lines
916 B
SQL
23 lines
916 B
SQL
CREATE TABLE `show_event_judges` (
|
|
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
`show_event_show_id` integer NOT NULL,
|
|
`judge_name` text NOT NULL,
|
|
`judge_arba_number` text,
|
|
`notes` text,
|
|
FOREIGN KEY (`show_event_show_id`) REFERENCES `show_event_shows`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `show_event_placements` (
|
|
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
`entry_id` integer NOT NULL,
|
|
`placement` text,
|
|
`legs_earned` integer DEFAULT 0 NOT NULL,
|
|
`bob` integer DEFAULT false NOT NULL,
|
|
`bos` integer DEFAULT false NOT NULL,
|
|
`bis` integer DEFAULT false NOT NULL,
|
|
`ris` integer DEFAULT false NOT NULL,
|
|
`notes` text,
|
|
FOREIGN KEY (`entry_id`) REFERENCES `show_event_entries`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE UNIQUE INDEX `show_event_placements_entry_id_unique` ON `show_event_placements` (`entry_id`); |