CREATE TABLE `cable_sizing_calculations` ( `id` text PRIMARY KEY NOT NULL, `project_id` text, `circuit_id` text, `equipment_identifier` text, `input` text NOT NULL, `result` text NOT NULL, `applied_to_circuit` integer DEFAULT 0 NOT NULL, `created_at` integer DEFAULT (unixepoch()) NOT NULL, FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE set null, FOREIGN KEY (`circuit_id`) REFERENCES `circuits`(`id`) ON UPDATE no action ON DELETE set null ); --> statement-breakpoint CREATE INDEX `cable_sizing_calculations_circuit_id_idx` ON `cable_sizing_calculations` (`circuit_id`);