adding energy cost figures to db

This commit is contained in:
Khalim Conn-Kowlessar 2024-10-03 09:57:55 +01:00
parent dec22cfa69
commit 2cb277ca2b
5 changed files with 2998 additions and 2 deletions

View file

@ -0,0 +1,6 @@
ALTER TABLE "property_details_epc" ADD COLUMN "heating_cost_current" real;--> statement-breakpoint
ALTER TABLE "property_details_epc" ADD COLUMN "hot_water_cost_current" real;--> statement-breakpoint
ALTER TABLE "property_details_epc" ADD COLUMN "lighting_cost_current" real;--> statement-breakpoint
ALTER TABLE "property_details_epc" ADD COLUMN "appliances_cost_current" real;--> statement-breakpoint
ALTER TABLE "property_details_epc" ADD COLUMN "gas_standing_charge" real;--> statement-breakpoint
ALTER TABLE "property_details_epc" ADD COLUMN "electricity_standing_charge" real;

File diff suppressed because it is too large Load diff

View file

@ -680,6 +680,13 @@
"when": 1725897920431,
"tag": "0096_married_umar",
"breakpoints": true
},
{
"idx": 97,
"version": "5",
"when": 1727945843077,
"tag": "0097_pale_demogoblin",
"breakpoints": true
}
]
}

View file

@ -175,6 +175,14 @@ export const propertyDetailsEpc = pgTable("property_details_epc", {
"current_energy_demand_heating_hotwater"
),
estimated: boolean("estimated").default(false),
// Include current estimates for energy bills, across the different types of energy
// These predictions are based on the EPC predicted consumptions + current energy prices
heatingEnergyCostCurrent: real("heating_cost_current"),
hotWaterEnergyCostCurrent: real("hot_water_cost_current"),
lightingEnergyCostCurrent: real("lighting_cost_current"),
appliancesEnergyCostCurrent: real("appliances_cost_current"),
gasStandingCharge: real("gas_standing_charge"),
electricityStandingCharge: real("electricity_standing_charge"),
});
export const propertyDetailsSpatial = pgTable("property_details_spatial", {

View file

@ -1,8 +1,8 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
// "target": "es5",
"target": "ESNext",
"target": "es5",
// "target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,