Merge pull request #244 from Hestia-Homes/feature/new-epc-tables

EPC tables: window transmission data source is text not int
This commit is contained in:
Daniel Roth 2026-04-27 17:41:43 +01:00 committed by GitHub
commit 38adea6e2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8627 additions and 2 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE "epc_window" RENAME COLUMN "pvc_frame" TO "frame_material" DROP NOT NULL;--> statement-breakpoint
ALTER TABLE "epc_window" ALTER COLUMN "transmission_data_source" SET DATA TYPE text;

File diff suppressed because it is too large Load diff

View file

@ -1310,6 +1310,13 @@
"when": 1777028605680,
"tag": "0186_equal_baron_zemo",
"breakpoints": true
},
{
"idx": 187,
"version": "7",
"when": 1777307158192,
"tag": "0187_mean_salo",
"breakpoints": true
}
]
}

View file

@ -732,7 +732,6 @@ export const epcWindow = pgTable(
.notNull()
.references(() => epcProperty.id),
pvcFrame: text("pvc_frame").notNull(),
glazingGap: text("glazing_gap").notNull(),
orientation: text("orientation").notNull(),
windowType: text("window_type").notNull(),
@ -743,12 +742,13 @@ export const epcWindow = pgTable(
windowLocation: text("window_location").notNull(),
windowWallType: text("window_wall_type").notNull(),
permanentShuttersPresent: boolean("permanent_shutters_present").notNull(),
frameMaterial: text("frame_material"),
frameFactor: real("frame_factor"),
permanentShuttersInsulated: text("permanent_shutters_insulated"),
// Transmission details (inlined)
transmissionUValue: real("transmission_u_value"),
transmissionDataSource: integer("transmission_data_source"),
transmissionDataSource: text("transmission_data_source"),
transmissionSolarTransmittance: real("transmission_solar_transmittance"),
},
);