BEGIN; -- Start a transaction

-- Update the data type for the "property" table
ALTER TABLE "property" ALTER COLUMN "id" SET DATA TYPE bigint;
ALTER SEQUENCE "property_id_seq" AS bigint; -- Replace with actual sequence name

-- Update the data type for the "property_details_epc" table
ALTER TABLE "property_details_epc" ALTER COLUMN "id" SET DATA TYPE bigint;
ALTER SEQUENCE "property_details_epc_id_seq" AS bigint; -- Replace with actual sequence name

-- Update the data type for the "property_details_meter" table
ALTER TABLE "property_details_meter" ALTER COLUMN "id" SET DATA TYPE bigint;
ALTER SEQUENCE "property_details_meter_id_seq" AS bigint; -- Replace with actual sequence name

-- Update the data type for the "property_targets" table
ALTER TABLE "property_targets" ALTER COLUMN "id" SET DATA TYPE bigint;
ALTER SEQUENCE "property_targets_id_seq" AS bigint; -- Replace with actual sequence name

COMMIT; -- Commit the transaction

ALTER TABLE "property_targets" ALTER COLUMN "property_id" SET DATA TYPE bigint;--> statement-breakpoint
ALTER TABLE "property_targets" ALTER COLUMN "portfolio_id" SET DATA TYPE bigint;