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

fix(core): Disable transactions on sqlite migrations that use PRAGMA foreign_keys #5392

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

netroy
Copy link
Member

@netroy netroy commented Feb 7, 2023

PRAGMA foreign_keys is a no-op within a sqlite transaction. This causes cascade deletes to happen when we create a new user table, and drop the old user table.

This issue was introduced in 0.211.0 via #5129.

https://community.n8n.io/t/workflows-gone-after-setting-up-user-management/22717
https://community.n8n.io/t/nothing-works-since-the-update/22738/

Fixes https://n8nio.sentry.io/issues/3919885885

… foreign_keys`

`PRAGMA foreign_keys` is [a no-op within a sqlite transaction](https://www.sqlite.org/pragma.html#pragma_foreign_keys).
This causes cascade deletes to happen when we create a new user table, and drop the old user table.
@netroy netroy requested review from krynble and ahsanv February 7, 2023 12:24
@netroy netroy added the skip-e2e label Feb 7, 2023
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Feb 7, 2023
@netroy netroy merged commit 3a435f7 into n8n-io:master Feb 7, 2023
@netroy netroy deleted the fix-data-deletion branch February 7, 2023 14:15
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Feb 7, 2023
@janober
Copy link
Member

janober commented Feb 10, 2023

Got released with n8n@0.215.0

@janober janober removed the Upcoming Release Will be part of the upcoming release label Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team skip-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants