Model/infrastructure/postgres/modelling
Khalim Conn-Kowlessar c18968ba3c refactor(modelling): consolidate scenario + installed_measure into the subpackage
Move the scenario and installed_measure tables into
infrastructure/postgres/modelling/ as full-parity SQLModel definitions
(ScenarioModel, InstalledMeasureModel + MeasureType), completing the cluster
consolidation. backend/app/db/models/recommendations.py is now a pure
re-export shim.

ScenarioModel.goal is the PortfolioGoal enum (legacy planning branches on it),
sourced from domain/modelling/portfolio_goal.py; the repo's to_domain maps it to
its value string, so domain Scenario.goal is now the value ("Increasing EPC")
consistent with the orchestrator's check — fixing the latent name-vs-value
inconsistency the old str column masked (the scenario repo test stored the enum
*name*). Parity columns are nullable (mirror convention; live NOT-NULLs owned by
Drizzle).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 22:52:35 +00:00
..
__init__.py refactor(modelling): consolidate scenario + installed_measure into the subpackage 2026-06-03 22:52:35 +00:00
installed_measure_table.py refactor(modelling): consolidate scenario + installed_measure into the subpackage 2026-06-03 22:52:35 +00:00
plan_table.py refactor(modelling): rename the cluster SQLModel classes …Row → …Model 2026-06-03 22:42:21 +00:00
recommendation_table.py refactor(modelling): rename the cluster SQLModel classes …Row → …Model 2026-06-03 22:42:21 +00:00
scenario_table.py refactor(modelling): consolidate scenario + installed_measure into the subpackage 2026-06-03 22:52:35 +00:00