23 lines
645 B
Python
23 lines
645 B
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 = 2
|
||
|
|
|
||
|
|
# Changelog for documentation
|
||
|
|
SCHEMA_CHANGELOG = {
|
||
|
|
1: "Initial schema with School and SchoolResult tables",
|
||
|
|
2: "Added pupil absence fields (reading, maths, gps, writing, science)",
|
||
|
|
}
|