Skip to content
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

The command "sequelize db:seed:undo:all" strikes, because an improper… #253

Closed
wants to merge 2 commits into from

Conversation

stuartZhang
Copy link

The command "sequelize db:seed:undo:all" strikes, because an improperly underlying Umzug API is invoked.

  1. Umzug.prototype.pending() serves both db:migrate and db:seed.
  2. Umzug.prototype.extecuted() serves both db:migrate:undo and db:seed:undo.

Mimicking the handle of the command "db:migrate:undo", supersede "migrator.pending()" with "migrator.executed()".

…ly underlying Umzug API is invoked.

  1. Umzug.prototype.pending() serves both db:migrate and db:seed.
  2. Umzug.prototype.extecuted() serves both db:migrate:undo and db:seed:undo.
Mimicking the handle of the command "db:migrate:undo", supersede "migrator.pending()" with "migrator.executed()".
@@ -113,7 +113,7 @@ module.exports = {

task: function () {
getMigrator('seeder', function (migrator) {
return migrator.pending()
return migrator.executed()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to handle both cases, for the case when there is no storage, pending is necessary, else executed is correct.

        return (helpers.umzug.getStorage('seeder') === 'none'
             ? migrator.pending()
             : migrator.executed())

…pending is necessary, else executed is correct.
@pi-kei
Copy link

pi-kei commented Jul 11, 2016

@stuartZhang Do you have plans to finish this pull request?

@shernshiou
Copy link

Any updates?

@chentsulin
Copy link

Any updates on this PR?

codetriage-readme-bot pushed a commit to codetriage-readme-bot/cli that referenced this pull request Jun 5, 2019
Add request and responses to debugging output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants