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
Merged

Conversation

@edevil
Copy link
Contributor

@edevil edevil commented Dec 20, 2018

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

Extra parameter allows all migrations to be rolled back.
});

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

@kibertoad kibertoad Dec 20, 2018

probably this shouldn't be committed :)

Copy link
Contributor Author

@edevil edevil Dec 20, 2018

Crap, sorry...

});
});

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

@kibertoad kibertoad Dec 20, 2018

why not use arrow function?

Copy link
Member

@ricardograca ricardograca Dec 21, 2018

Because of this?

Copy link
Collaborator

@kibertoad kibertoad Dec 21, 2018

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

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

@kibertoad kibertoad Dec 20, 2018

is this needed?

Copy link
Contributor Author

@edevil edevil Dec 20, 2018

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>;
Copy link
Collaborator

@kibertoad kibertoad Dec 20, 2018

haha, nice touch!

@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Dec 20, 2018

Could you also create a PR in documentation repo?

@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Dec 20, 2018

LGTM, we can merge it after documentation is created.

@edevil
Copy link
Contributor Author

@edevil edevil commented Dec 20, 2018

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

@kibertoad kibertoad merged commit c2dff7f into knex:master Dec 20, 2018
2 checks passed
@kibertoad
Copy link
Collaborator

@kibertoad 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants