Pre-1.0 software with no installed base — no need to handle
converting from old TEXT-based schema_migrations format.
Removed: convertLegacyMigrations, ensureBootstrapVersion,
readLegacyVersions, rebuildMigrationsTable, and
TestApplyMigrationsLegacyConversion.
Simplified bootstrapMigrationsTable to only check existence
and run 000_migration.sql if missing.
- Rename bootstrap migration from 000.sql to 000_migration.sql per
REPO_POLICIES.md naming convention (NNN_description.sql pattern)
- Update all hardcoded references in migrations.go
- Wrap rebuildMigrationsTable() DROP/CREATE/INSERT sequence in a
single transaction for crash safety
- Update test case filename to match renamed file
Refactors the migration system to follow the pixa pattern:
- Add 000.sql bootstrap migration that creates schema_migrations with
INTEGER PRIMARY KEY version column
- Go code no longer creates the migrations table inline; it reads and
executes 000.sql as a bootstrap step before the normal migration loop
- Export ParseMigrationVersion and ApplyMigrations for test use
- Add legacy TEXT-to-INTEGER conversion for existing databases that
stored migration versions as filenames (e.g. '001_initial.sql')
- Wrap individual migration application in transactions for safety
- Add comprehensive tests for version parsing, fresh database bootstrap,
idempotent re-application, and legacy conversion