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

Added --from and --to support for db:migrate #581

Merged
merged 4 commits into from
Nov 17, 2017

Conversation

behcet
Copy link
Contributor

@behcet behcet commented Nov 3, 2017

Enables underlying umzug functionality

Copy link
Contributor

@sushantdhiman sushantdhiman left a comment

Choose a reason for hiding this comment

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

A good addition to CLI, needs a bit more verification in tests .

expect(tables).to.have.length(3);
expect(tables).to.contain('User');
runCli('db:migrate --to ' + createTriggers, err => {
done(err);
Copy link
Contributor

Choose a reason for hiding this comment

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

For proper verification, check for containment of No migrations were executed, database schema was already up to date. and error code 0 here

@behcet
Copy link
Contributor Author

behcet commented Nov 15, 2017

@sushantdhiman Extended tests to include what you requested

expect(tables).to.contain('Post');
expect(tables).to.contain('trigger_test');
runCli('db:migrate --from ' + createPost, err => {
done(err);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add same check here

@behcet
Copy link
Contributor Author

behcet commented Nov 16, 2017

@sushantdhiman I haven't initially added checks for --from migrations because it wasn't throwing any errors unlike --to. Latest commit introduces that check too

@sushantdhiman sushantdhiman merged commit 4a7e6c4 into sequelize:master Nov 17, 2017
sushantdhiman added a commit that referenced this pull request Dec 3, 2017
codetriage-readme-bot pushed a commit to codetriage-readme-bot/cli that referenced this pull request Jun 5, 2019
Move API error handling into the commands
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.

None yet

2 participants