PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 9m39s
PR Checks / Backend Smoke (pull_request) Successful in 5s
PR Checks / Build Backend (no push) (pull_request) Successful in 17s
PR Checks / Build Frontend (no push) (pull_request) Successful in 41s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 45s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 1m35s
Removes the 'What Parents Say' section and all supporting elements: Frontend: - Drop the OfstedParentView type, the parent_view field, the survey section and the 'X% would recommend' callouts in the primary and secondary detail views, the Parents nav item, and the parent-view CSS. Backend: - Remove the FactParentView model, its loading in data_loader, and parent_view from the school-details API response. - Bump SCHEMA_VERSION to 6 and add an idempotent drop step (DROP TABLE IF EXISTS marts.fact_parent_view) to the CLI migration; add scripts/sql/drop_fact_parent_view.sql to apply directly to the dbt-owned marts DBs on staging and prod. Pipeline: - Delete the stg_parent_view + fact_parent_view dbt models and their source/schema entries, the tap-uk-parent-view Meltano extractor, and the monthly Parent View DAG; drop it from the Dockerfile and the staging bootstrap docs. The rest of dbt (which builds every mart the app reads) is untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
27 lines
1.0 KiB
Python
27 lines
1.0 KiB
Python
"""
|
|
Schema versioning for database migrations.
|
|
|
|
HOW TO USE:
|
|
- Bump SCHEMA_VERSION when making changes to database models
|
|
- This triggers an automatic full data reimport on next app startup
|
|
|
|
WHEN TO BUMP:
|
|
- Adding/removing columns in models.py
|
|
- Changing column types or constraints
|
|
- Modifying CSV column mappings in schemas.py
|
|
- Any change that requires fresh data import
|
|
"""
|
|
|
|
# Current schema version - increment when models change
|
|
SCHEMA_VERSION = 6
|
|
|
|
# Changelog for documentation
|
|
SCHEMA_CHANGELOG = {
|
|
1: "Initial schema with School and SchoolResult tables",
|
|
2: "Added pupil absence fields (reading, maths, gps, writing, science)",
|
|
3: "Added supplementary data tables: ofsted, parent_view, census, admissions, sen_detail, phonics, deprivation, finance; GIAS columns on schools",
|
|
4: "Added Ofsted Report Card columns to ofsted_inspections (new framework from Nov 2025)",
|
|
5: "Apply ALTER TABLE additions for RC columns missed by create_all on existing tables",
|
|
6: "Removed the Ofsted Parent View feature: dropped fact_parent_view table and model",
|
|
}
|