2026-01-16 10:23:02 +00:00
|
|
|
"""
|
|
|
|
|
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
|
feat(data): integrate 9 UK government data sources via Kestra
Adds a full data integration pipeline for enriching school profiles with
supplementary data from Ofsted, GIAS, EES, IDACI, and FBIT.
Backend:
- Bump SCHEMA_VERSION to 3; add 8 new DB tables (ofsted_inspections,
ofsted_parent_view, school_census, admissions, sen_detail, phonics,
school_deprivation, school_finance) plus GIAS columns on schools
- Expose all supplementary data via GET /api/schools/{urn}
- Enrich school list responses with ofsted_grade + ofsted_date
Integrator (new service):
- FastAPI HTTP microservice; Kestra calls POST /run/{source}
- 9 source modules: ofsted, gias, parent_view, census, admissions,
sen_detail, phonics, idaci, finance
- 9 Kestra flow YAMLs with scheduled triggers and 3× retry
Frontend:
- SchoolRow: colour-coded Ofsted badge (Outstanding/Good/RI/Inadequate)
- SchoolDetailView: 7 new sections — Ofsted sub-judgements, Parent View
survey bars, Admissions, Pupils & Inclusion / SEN, Phonics, Deprivation
Context, Finances
- types.ts: 8 new interfaces + extended School/SchoolDetailsResponse
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:44:04 +00:00
|
|
|
SCHEMA_VERSION = 3
|
2026-01-16 10:23:02 +00:00
|
|
|
|
|
|
|
|
# Changelog for documentation
|
|
|
|
|
SCHEMA_CHANGELOG = {
|
|
|
|
|
1: "Initial schema with School and SchoolResult tables",
|
|
|
|
|
2: "Added pupil absence fields (reading, maths, gps, writing, science)",
|
feat(data): integrate 9 UK government data sources via Kestra
Adds a full data integration pipeline for enriching school profiles with
supplementary data from Ofsted, GIAS, EES, IDACI, and FBIT.
Backend:
- Bump SCHEMA_VERSION to 3; add 8 new DB tables (ofsted_inspections,
ofsted_parent_view, school_census, admissions, sen_detail, phonics,
school_deprivation, school_finance) plus GIAS columns on schools
- Expose all supplementary data via GET /api/schools/{urn}
- Enrich school list responses with ofsted_grade + ofsted_date
Integrator (new service):
- FastAPI HTTP microservice; Kestra calls POST /run/{source}
- 9 source modules: ofsted, gias, parent_view, census, admissions,
sen_detail, phonics, idaci, finance
- 9 Kestra flow YAMLs with scheduled triggers and 3× retry
Frontend:
- SchoolRow: colour-coded Ofsted badge (Outstanding/Good/RI/Inadequate)
- SchoolDetailView: 7 new sections — Ofsted sub-judgements, Parent View
survey bars, Admissions, Pupils & Inclusion / SEN, Phonics, Deprivation
Context, Finances
- types.ts: 8 new interfaces + extended School/SchoolDetailsResponse
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:44:04 +00:00
|
|
|
3: "Added supplementary data tables: ofsted, parent_view, census, admissions, sen_detail, phonics, deprivation, finance; GIAS columns on schools",
|
2026-01-16 10:23:02 +00:00
|
|
|
}
|