Commit Graph

1 Commits

Author SHA1 Message Date
user
63f8cd1bd0 feat: parse version prefix from migration filenames
All checks were successful
check / check (push) Successful in 1m51s
Migration filenames now follow the pattern <version>_<description>.sql
(e.g. 001_initial_schema.sql). The version stored in schema_migrations
is the numeric prefix only, not the full filename stem.

Changes:
- Add ParseMigrationVersion() to extract numeric prefix from filenames
- Validate version is purely numeric, reject malformed filenames
- Rename 001.sql to 001_initial_schema.sql for clarity
- Deduplicate runMigrations/ApplyMigrations via shared applyMigrations()
- Add comprehensive unit tests for version parsing and migration apply

Closes #28
2026-03-15 11:24:31 -07:00