• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

migration-script-runner / msr-core / fec3ca21-f623-48f9-8f17-586d21fcb45f
100%

Build:
DEFAULT BRANCH: master
Ran 27 Nov 2025 10:03PM UTC
Jobs 1
Files 39
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Nov 2025 10:03PM UTC coverage: 100.0%. Remained the same
fec3ca21-f623-48f9-8f17-586d21fcb45f

push

circleci

Vova Lavrynovych
#67: Add version control support with migrateTo() and downTo()

Implement controlled upgrade/downgrade to specific database versions for staged deployments, testing, and rollback scenarios.

New Features:
- migrateTo(targetVersion): Execute migrations up to specific version
- downTo(targetVersion): Roll back migrations to specific version
- Immediate save pattern: Migration state saved after each operation
- Version selector methods: getPendingUpTo(), getMigratedDownTo(), getMigratedInRange()
- ISchemaVersion.remove(): Remove migration records during rollback

Key Implementation Details:
- Added validation and hooks to all version control methods
- Fixed critical bug: schema version table now initialized BEFORE scan()
- scan() needs to query schema_version table, must be initialized first
- Proper error handling with rollback support in migrateTo()
- downTo() validates migrations and calls down() methods in reverse order

Breaking Changes: None - purely additive features

Testing:
- Added 31 new tests for version control functionality
- Achieved 100% test coverage (989/989 statements, 486/486 branches)
- All 525 tests passing

Documentation:
- Added comprehensive API reference for new methods
- Created version-control.md guide with real-world use cases
- Updated getting-started.md with version control examples
- Enhanced architecture.md with selector method details

Use Cases:
- Staged production deployments
- Emergency rollback to known-good versions
- Testing specific migration versions
- Blue-green deployments with version parity

486 of 486 branches covered (100.0%)

Branch coverage included in aggregate %.

89 of 89 new or added lines in 3 files covered. (100.0%)

931 of 931 relevant lines covered (100.0%)

585.47 hits per line

Jobs
ID Job ID Ran Files Coverage
1 fec3ca21-f623-48f9-8f17-586d21fcb45f.1 27 Nov 2025 10:03PM UTC 39
100.0
Source Files on build fec3ca21-f623-48f9-8f17-586d21fcb45f
  • Tree
  • List 39
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • CircleCI Build #FEC3CA21...
  • 483f3648 on github
  • Prev Build on master (#BADC1C59...)
  • Next Build on master (#37DEC3AC...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc