CREATE TABLE "epc_photovoltaic_array" (
	"id" bigserial PRIMARY KEY NOT NULL,
	"epc_property_id" bigint NOT NULL,
	"array_index" integer NOT NULL,
	"peak_power" real NOT NULL,
	"pitch" integer NOT NULL,
	"overshading" integer NOT NULL,
	"orientation" integer
);
--> statement-breakpoint
ALTER TABLE "epc_floor_dimension" ADD COLUMN "is_exposed_floor" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "epc_floor_dimension" ADD COLUMN "is_above_partially_heated_space" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "epc_photovoltaic_array" ADD CONSTRAINT "epc_photovoltaic_array_epc_property_id_epc_property_id_fk" FOREIGN KEY ("epc_property_id") REFERENCES "public"."epc_property"("id") ON DELETE no action ON UPDATE no action;