Drop the unused x and y columns from API v2's UK area impact tables
維護者通常 2 天內回覆
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 35/100
研究方向
Start with the SQLModel tables in policyengine_api/data/v2/models/reports.py and the baseline revision f5ef4347cb2a; check how v2 Alembic revisions are generated and how their downgrade functions are written. Remove x and y from both tables and add an autogenerated revision that drops those columns and restores them on downgrade. Done means the models and revision match the intended schema; deployment is scheduled after the UK Budget on 28 October 2026 and requires Anthony's approval.
由索引模型根據 Issue 內容生成。
描述
API v2's constituency_impacts and local_authority_impacts tables (the ConstituencyImpact and LocalAuthorityImpact SQLModel tables in policyengine_api/data/v2/models/reports.py) each have required x and y integer columns, created by the v2 baseline revision f5ef4347cb2a. They hold hex-map positions.
Nothing needs these values: the app draws its UK maps from its own layout files, and nothing in the Public API reads or writes either table yet. No managed v2 database role holds any privilege on them (policyengine_api/data/v2/privileges.py).
Intended result
The two tables have no x or y columns, removed by an autogenerated v2 Alembic revision whose downgrade adds them back, and the SQLModel tables match.
Deployment
Deploying the revision changes the staging and production v2 schemas. The merge needs Anthony's approval and waits until after the UK Budget on 28 October 2026.
- 主要語言
- Python
- 星號
- 18
- 分支
- 33
- 平均合併
- 2 天 7 小時
- 30 天內合併 PR
- 64
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PolicyEngine/policyengine-api 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
維護者通常 2 天內回覆
-
難度 1/5 1-3 小時 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
維護者通常 2 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
維護者通常 2 天內回覆
-
Split the release tests over six runners, and stop repeating the merge run's checks on the release commit可能已有人在做 @anth-volk 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 25/100
PolicyEngine/policyengine-api#4133 ·
維護者通常 2 天內回覆
-
Serve household reports at /v2/reports可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 4/5 3-5 天 新手友好度 48/100
PolicyEngine/policyengine-api#4131 ·
維護者通常 2 天內回覆
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 2 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
developmentseed/titiler-cmr#278 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 2 天內回覆