Vellum/internal/core
mithral 35e81400f2 Refuse to start when the database is newer than the binary
Migrate only skipped migrations whose number was already applied (n <=
current). Point an older binary at a database a newer binary had already
migrated and it started happily, then read columns that had moved. For a
self-hosted app that is the worst failure mode: silent schema confusion
rather than a clean refusal.

Migrate now errors when PRAGMA user_version exceeds the highest embedded
migration, naming both numbers. Both callers already propagate the error,
so the binary exits at startup instead.

Verified red-green: removing the guard fails
TestMigrateRefusesDatabaseNewerThanBinary.
2026-10-12 00:45:27 -04:00
..
config.go Documentation, and make a fresh clone actually work 2026-10-12 00:18:11 -04:00
config_test.go Phase 0: skeleton, config, migrations, health check, container 2026-10-09 16:26:08 -04:00
db.go Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
logging.go Phase 0: skeleton, config, migrations, health check, container 2026-10-09 16:26:08 -04:00
migrate.go Refuse to start when the database is newer than the binary 2026-10-12 00:45:27 -04:00
migrate_test.go Refuse to start when the database is newer than the binary 2026-10-12 00:45:27 -04:00
stamp.go Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
stamp_test.go Wave 1: survive a real library 2026-10-11 13:10:34 -04:00