mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Stop writing the m2m (remove create_plan_recommendations + its call, the bulk link insert and the now-dead plan_ids_by_index, and the plan_recommendations delete in delete_property_batch) and remove the PlanRecommendationRow model + its shim alias and the test_export fixture inserts. Measures now link to their Plan solely via recommendation.plan_id (writers set it, readers join on it). The live drop of the plan_recommendations table is the FE-owned Drizzle migration documented in docs/migrations/recommendation-plan-id.md, sequenced after the read-cut + backfill. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
731 B
Python
22 lines
731 B
Python
"""SQLModel definitions of the Modelling stage's live persistence tables
|
|
(ADR-0017 amendment).
|
|
|
|
One canonical SQLModel per physical table — `plan`, `recommendation`,
|
|
`recommendation_materials` — replacing the legacy SQLAlchemy `Base` models in
|
|
`backend/app/db/models/recommendations.py` (now a re-export shim, the
|
|
`epc_property` pattern). `recommendation` carries `plan_id`; the
|
|
`plan_recommendations` m2m is retired.
|
|
"""
|
|
|
|
from infrastructure.postgres.modelling.plan_table import PlanRow, PlanType
|
|
from infrastructure.postgres.modelling.recommendation_table import (
|
|
RecommendationMaterialRow,
|
|
RecommendationRow,
|
|
)
|
|
|
|
__all__ = [
|
|
"PlanRow",
|
|
"PlanType",
|
|
"RecommendationRow",
|
|
"RecommendationMaterialRow",
|
|
]
|