-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
I have found these related issues/pull requests
None
Description
I want to write tests for my migrations, making sure that each up and down migration has the expected result. For this I want to target a specific migration, seeds some data, up and/or down a migration, and validate the resulting data and/or schema.
Migrator::run however does not allow you to target a specific migration. It always applies all of the migrations. This is different for Migrator::undo, which can target a specific version.
Prefered solution
Add a function that allows me to select a target version. Perhaps even singular up and down methods which up/down the next/current migration, which are then composed into run, undo and a version of run with a target version.
Is this a breaking change? Why or why not?
Only if the interface of run is updated. Breaking changes can be avoided by adding a separate method, but this will clutter the public API.