-- Consolidate start_price and expiry_price into single price column
-- Since offers now have a constant price (no linear interpolation), we only need one column

-- Add new price column
ALTER TABLE "router_v1.7"."offers" ADD COLUMN "price" numeric(78, 0);--> statement-breakpoint

-- Migrate data: copy start_price to price (they should be equal, use start_price as canonical)
UPDATE "router_v1.7"."offers" SET price = start_price;--> statement-breakpoint

-- Make price NOT NULL after migration
ALTER TABLE "router_v1.7"."offers" ALTER COLUMN "price" SET NOT NULL;--> statement-breakpoint

-- Drop the old columns
ALTER TABLE "router_v1.7"."offers" DROP COLUMN "start_price";--> statement-breakpoint
ALTER TABLE "router_v1.7"."offers" DROP COLUMN "expiry_price";
