Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(migration): add function to undo migrations
Right now, there is only a `run` function to programatically run the migrations, which is great, but nothing to run the migrations down. This function adds the possibility to undo the migrations until a specific version (could say -1 or 0 to remove them all). With this feature, it's now possible, in the end to end or integration tests to run the migrations and undo them between each test set and therefore test the migrations themselves. This is the kind of feature that some ORM have like sequelize in nodejs that allow you to undo migrations programatically. Reference to the doc: https://sequelize.org/v7/manual/migrations.html#undoing-migrations Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
- Loading branch information