Search for "executed" instead of "pending" migrations using db:seed:undo:all #391
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I started using a sequelize seeder storage,
db:seed:undo:all
did not worked anymore. After some investigations, I noticed that the command was looking for pending migrations instead of executed migrations. The similar behavior is correct fordb:migration:undo:all
.I guess the problem does not occur when we do not use a storage because in this case there is no executed vs pending migrations.The PR causes the unwanted behavior to occur when NOT using a storage. But does it really make sense to use this command without using a storage since there is no executed / pending migration in this case? Similarly when not using a storage,
db:seed:all
will execute seeds even if they already have been executed before, while using a storage, only pending seeds are executed.If the desired behavior really is to consider all migrations as "pending" when not using a storage, I think this should be defined in Umzug's none storage and not in the sequelize CLI.
Any thoughts #?