CREATE TABLE `geo_delivery_acceptance_items` (
	`id` text PRIMARY KEY NOT NULL,
	`project_id` text NOT NULL,
	`snapshot_id` text NOT NULL,
	`item_id` text NOT NULL,
	`category` text NOT NULL,
	`item_name` text NOT NULL,
	`unit` text NOT NULL,
	`contract_quantity` real NOT NULL,
	`qualified_quantity` real NOT NULL,
	`weight` real NOT NULL,
	`evidence_url` text NOT NULL,
	`note` text DEFAULT '' NOT NULL,
	`import_job_id` text,
	`created_at` text NOT NULL,
	FOREIGN KEY (`project_id`) REFERENCES `geo_projects`(`id`) ON UPDATE no action ON DELETE cascade,
	FOREIGN KEY (`snapshot_id`) REFERENCES `geo_snapshots`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE UNIQUE INDEX `geo_delivery_acceptance_snapshot_item_unique` ON `geo_delivery_acceptance_items` (`snapshot_id`,`item_id`);--> statement-breakpoint
CREATE INDEX `geo_delivery_acceptance_snapshot_idx` ON `geo_delivery_acceptance_items` (`snapshot_id`);