CREATE TABLE `external_export_batches` ( `id` text PRIMARY KEY NOT NULL, `project_id` text NOT NULL, `project_revision` integer NOT NULL, `import_batch_id` text NOT NULL, `exported_at_iso` text NOT NULL, `file_name` text NOT NULL, `sha256` text NOT NULL, `configuration_snapshot` text NOT NULL, `configuration_sha256` text NOT NULL, `scope` text NOT NULL, `object_count` integer NOT NULL, FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade ); --> statement-breakpoint CREATE INDEX `external_export_batches_project_exported_idx` ON `external_export_batches` (`project_id`,`exported_at_iso`);