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

Implemented extra boolean param for rollback() #2968

Merged
merged 4 commits into from Dec 20, 2018

Conversation

Projects
None yet
3 participants
@edevil
Copy link
Contributor

edevil commented Dec 20, 2018

Extra parameter allows all migrations to be rolled back.
Addresses #2844

Implemented extra boolean param for rollback()
Extra parameter allows all migrations to be rolled back.
});

it('should delete all batches from the migration log', function() {
debugger;

This comment has been minimized.

Copy link
@kibertoad

kibertoad Dec 20, 2018

Collaborator

probably this shouldn't be committed :)

This comment has been minimized.

Copy link
@edevil

edevil Dec 20, 2018

Author Contributor

Crap, sorry...

});
});

it('should delete all batches from the migration log', function() {

This comment has been minimized.

Copy link
@kibertoad

kibertoad Dec 20, 2018

Collaborator

why not use arrow function?

This comment has been minimized.

Copy link
@ricardograca

ricardograca Dec 21, 2018

Collaborator

Because of this?

This comment has been minimized.

Copy link
@kibertoad

kibertoad Dec 21, 2018

Collaborator

well yeah when it's needed, but when it's not?..

true
)
.spread(function(batchNo, log) {
console.log(`Batch ${batchNo}, log: ${JSON.stringify(log)}`);

This comment has been minimized.

Copy link
@kibertoad

kibertoad Dec 20, 2018

Collaborator

is this needed?

This comment has been minimized.

Copy link
@edevil

edevil Dec 20, 2018

Author Contributor

Oops, sorry.

@@ -829,7 +829,7 @@ declare namespace Knex {
interface Migrator {
make(name: string, config?: MigratorConfig): Bluebird<string>;
latest(config?: MigratorConfig): Bluebird<any>;
rollback(config?: MigratorConfig): Bluebird<any>;
rollback(config?: MigratorConfig, all?: boolean): Bluebird<any>;

This comment has been minimized.

Copy link
@kibertoad

kibertoad Dec 20, 2018

Collaborator

haha, nice touch!

@kibertoad

This comment has been minimized.

Copy link
Collaborator

kibertoad commented Dec 20, 2018

Could you also create a PR in documentation repo?

edevil added some commits Dec 20, 2018

@kibertoad

This comment has been minimized.

Copy link
Collaborator

kibertoad commented Dec 20, 2018

LGTM, we can merge it after documentation is created.

@edevil

This comment has been minimized.

Copy link
Contributor Author

edevil commented Dec 20, 2018

@kibertoad Great! The docs PR is at knex/documentation#170

@kibertoad kibertoad merged commit c2dff7f into tgriesser:master Dec 20, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 85.008%
Details
@kibertoad

This comment has been minimized.

Copy link
Collaborator

kibertoad commented Dec 20, 2018

Thank you a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.