ALTER TABLE "image_uploads" ADD COLUMN "reject_reason_code" text;--> statement-breakpoint
ALTER TABLE "vendors" ADD COLUMN "hero_pending_image_url" text;--> statement-breakpoint
ALTER TABLE "vendors" ADD COLUMN "hero_pending_image_r2_key" text;--> statement-breakpoint
ALTER TABLE "vendors" ADD COLUMN "hero_image_reject_reason_code" text;

-- Promote existing approved heroes: vendors with heroImageUrl + PENDING status
-- (default from prior migration) and no pending upload get promoted immediately.
UPDATE "vendors"
SET "hero_image_approval_status" = 'APPROVED'
WHERE "hero_image_url" IS NOT NULL
  AND "hero_image_approval_status" = 'PENDING'
  AND "hero_pending_image_url" IS NULL;