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

Fixed #4295 #4308

Merged
merged 1 commit into from
Feb 22, 2021
Merged

Fixed #4295 #4308

merged 1 commit into from
Feb 22, 2021

Conversation

richardsimko
Copy link
Contributor

@richardsimko richardsimko commented Feb 22, 2021

Backport of #4296

@richardsimko richardsimko marked this pull request as ready for review February 22, 2021 10:43
@kibertoad kibertoad merged commit cd306c1 into knex:0.21 Feb 22, 2021
@kibertoad
Copy link
Collaborator

Thank you!

Comment on lines -83 to +92
!migrations.some((migration) => {
const migrationContents = this.config.migrationSource.getMigration(
migration
);
return !this._useTransaction(migrationContents);
});
!(
await Promise.all(
migrations.map(async (migration) => {
const migrationContents = await this.config.migrationSource.getMigration(
migration
);
return !this._useTransaction(migrationContents);
})
)
).some((isTransactionUsed) => isTransactionUsed);
Copy link

@falkenhawk falkenhawk Feb 22, 2021

Choose a reason for hiding this comment

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

were the changes in Migrator intended in this PR? what issue are they addressing?

Choose a reason for hiding this comment

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

Okay I can see more details in #4296

Copy link
Collaborator

Choose a reason for hiding this comment

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

@falkenhawk Did that cause some breaking changes for you?

Copy link

@falkenhawk falkenhawk Feb 22, 2021

Choose a reason for hiding this comment

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

I can't tell yet, I noticed this while I was looking through the changes after I got notified by renovatebot about the new knex version 0.21.18... and not having this explicitly listed in changelog confused me and stopped me from upgrading, as it seemed to me to be something extra than just a fix for #4295 - and I could not afford breaking things at that moment 😅

If I decide to upgrade in the following days and will run into some issues, I will let you know then.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It should behave same way for the end user in most cases, and also handle ESM case better, see #4296 (comment) for the reason of more methods becoming async. If you are not using ESM, this upgrade won't do anything useful for you.

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

3 participants