ALTER TABLE "funding_package_measures" ALTER COLUMN "measure" SET DATA TYPE text;--> statement-breakpoint
ALTER TABLE "material" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint
DROP TYPE "public"."type";--> statement-breakpoint
CREATE TYPE "public"."type" AS ENUM('suspended_floor_insulation', 'solid_floor_insulation', 'external_wall_insulation', 'internal_wall_insulation', 'cavity_wall_insulation', 'mechanical_ventilation', 'loft_insulation', 'exposed_floor_insulation', 'flat_roof_insulation', 'room_roof_insulation', 'cavity_wall_extraction', 'iwi_wall_demolition', 'iwi_vapour_barrier', 'iwi_redecoration', 'suspended_floor_demolition', 'suspended_floor_redecoration', 'suspended_floor_vapour_barrier', 'solid_floor_demolition', 'solid_floor_preparation', 'solid_floor_vapour_barrier', 'solid_floor_redecoration', 'ewi_wall_demolition', 'ewi_wall_preparation', 'ewi_wall_redecoration', 'low_energy_lighting_installation', 'flat_roof_preparation', 'flat_roof_vapour_barrier', 'flat_roof_waterproofing', 'windows_glazing', 'trickle_vent', 'door_undercut', 'solar_pv', 'solar_battery', 'scaffolding', 'high_heat_retention_storage_heaters', 'air_source_heat_pump', 'sealing_open_fireplace');--> statement-breakpoint
ALTER TABLE "funding_package_measures" ALTER COLUMN "measure" SET DATA TYPE "public"."type" USING "measure"::"public"."type";--> statement-breakpoint
ALTER TABLE "material" ALTER COLUMN "type" SET DATA TYPE "public"."type" USING "type"::"public"."type";