From b850e8639cf9c4896d5c48cab101dc5e91a6ce9a Mon Sep 17 00:00:00 2001 From: Tudor Date: Wed, 25 Mar 2026 14:41:15 +0000 Subject: [PATCH] fix(migration): bump to schema v5 to re-trigger ALTER TABLE for RC columns The v4 migration already ran before _apply_schema_alterations() was added, so the new ofsted_inspections columns were never created. Bump to v5 so the next backend restart re-runs the migration and applies the ALTER TABLE statements. Co-Authored-By: Claude Sonnet 4.6 --- backend/version.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/version.py b/backend/version.py index 12b4ff5..6cfe203 100644 --- a/backend/version.py +++ b/backend/version.py @@ -13,7 +13,7 @@ WHEN TO BUMP: """ # Current schema version - increment when models change -SCHEMA_VERSION = 4 +SCHEMA_VERSION = 5 # Changelog for documentation SCHEMA_CHANGELOG = { @@ -21,4 +21,5 @@ SCHEMA_CHANGELOG = { 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", }