CREATE TABLE `incident_postmortem` ( `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `incident_id` integer NOT NULL, `status` text DEFAULT 'draft' NOT NULL, `content` text NOT NULL, `source_transcript` text, `drafted_by` text NOT NULL, `created_by` integer, `updated_by` integer, `approved_by` integer, `approved_at` integer, `published_at` integer, `created_at` integer DEFAULT (strftime('%s', 'now')) NOT NULL, `updated_at` integer DEFAULT (strftime('%s', 'now')) NOT NULL, FOREIGN KEY (`incident_id`) REFERENCES `incident`(`id`) ON UPDATE no action ON DELETE cascade, FOREIGN KEY (`created_by`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action, FOREIGN KEY (`updated_by`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action, FOREIGN KEY (`approved_by`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint CREATE UNIQUE INDEX `incident_postmortem_incident_id_unique` ON `incident_postmortem` (`incident_id`);