-- Metadata-only DDL: adding nullable columns with no default is an instant
-- catalog change. The FK is added NOT VALID (no scan); it is validated online
-- and the index built CONCURRENTLY by the standalone backfill script, after the
-- columns are populated.
-- See docs/adr/0001-data-backfills-outside-drizzle.md
ALTER TABLE "recommendation" ADD COLUMN "material_id" bigint;--> statement-breakpoint
ALTER TABLE "recommendation" ADD COLUMN "material_quantity" real;--> statement-breakpoint
ALTER TABLE "recommendation" ADD COLUMN "material_quantity_unit" "unit_quantity";--> statement-breakpoint
ALTER TABLE "recommendation" ADD COLUMN "material_depth" real;--> statement-breakpoint
ALTER TABLE "recommendation" ADD CONSTRAINT "recommendation_material_id_material_id_fk" FOREIGN KEY ("material_id") REFERENCES "public"."material"("id") ON DELETE set null ON UPDATE no action NOT VALID;
