-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add step option to Migrator #940
Conversation
@MaximeMRF I have no idea what does step migration does. So please explain me the concept of step migration and its use cases :) |
Hello @thetutlage The step flag allow the rollback of a number of migrations and it not depend of batch. The rollback is made on the last migrations: for example if I have a step of 3, the 3 last migrations will be rollback. I think there is many use cases that step can be great like if you migrate new files but you have make a mistake on the last one. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hey @MaximeMRF! 👋🏻 Could you re-open a PR for AdonisJS 6? |
Hi @RomainLanz, yes if you are interested by the feature ? otherwise i will just delete this PR |
Sorry, I slept on this because was super busy with v6 stuff at that point in time. To be honest, I am not very keen to add this feature and maintain it in the long run. I agree that there are use-cases for this, but its not something most of the users need (including myself). Again, I am looking at it from the maintainability point of view and not disregarding the use-case for the feature. |
I disagree. This feature is really useful for managing exactly how your rollback flow will be executed. It is especially useful in development when you are using |
Agree with @RomainLanz it will be very helpful for development and also to reproduce exact batch of the production environment in development. Actually I have only implemented the step option for the rollback command but i believe that it can be useful if the step option is also available for the refresh command. |
Yeah, had a word with @RomainLanz in private and I am on-board with the changes. Please open a PR for v6 and we will be happy to accept it :) |
Proposed changes
Currently
Migrator
does not allow rollback only a defined number of migrations. With thestep
option you can choose the number of migration you want to rollback.Types of changes
Checklist