refactor(persistence): freeze legacy DB migration chain, drop dbm026

The legacy pkg/persistence/migrations (DBMigration / dbmXXX) system now
coexists with Alembic but accepts no new migrations — all new schema
changes go through Alembic.

- remove dbm026_llm_model_context_length (superseded by Alembic
  0005_add_llm_context_length, which makes the identical change)
- cap required_database_version at 25 (legacy chain dbm001-025 kept
  read-only to upgrade pre-existing 3.x DBs to the Alembic baseline)
- add migrations/README.md documenting the freeze
- document the Alembic-only policy and revision-id/idempotency rules in
  AGENTS.md
This commit is contained in:
RockChinQ
2026-06-13 05:26:08 -04:00
parent 672abfe95d
commit a2c6c8201b
4 changed files with 52 additions and 44 deletions

View File

@@ -2,8 +2,14 @@ import langbot
semantic_version = f'v{langbot.__version__}'
required_database_version = 26
"""Tag the version of the database schema, used to check if the database needs to be migrated"""
required_database_version = 25
"""Tag the version of the legacy (3.x) database schema migration chain.
Frozen at 25: the legacy ``pkg/persistence/migrations`` system (DBMigration /
dbmXXX_*.py) is deprecated and no longer accepts new migrations. All schema
changes from here on are managed by Alembic (see
``pkg/persistence/alembic/versions``). This value only gates the one-time
upgrade of pre-existing 3.x databases up to the Alembic baseline."""
debug_mode = False