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

Add support for PRAGMA legacy_alter_table #481

Closed
kpts44 opened this issue Mar 17, 2020 · 2 comments · Fixed by #848
Closed

Add support for PRAGMA legacy_alter_table #481

kpts44 opened this issue Mar 17, 2020 · 2 comments · Fixed by #848
Labels
enhancement:SQLite Enhancement about sqlite features good first issue Good first issue for new contributors released Issue has been released

Comments

@kpts44
Copy link

kpts44 commented Mar 17, 2020

I heavily rely on "ALTER TABLE ... RENAME TO ..." for migrations between database versions in my application. Since upgrading SQLite, this also renames the FOREIGN KEY linking to the renamed table, which is something I really do not want as this is a migration, and the original table (with the original table name) is going to be recreated.

This behavior is documented here: https://www.sqlite.org/lang_altertable.html

In order to retain the legacy behavior where foreign keys are not renamed, I need to use PRAGMA legacy_alter_table which is not in the list of accepted pragmas. For now, I added it and recompiled, but I think this pragma deserves to be in the list :)

@gotson gotson added the enhancement:SQLite Enhancement about sqlite features label Jul 27, 2022
@gotson gotson added the good first issue Good first issue for new contributors label Aug 11, 2022
@tjaved970
Copy link

are there any workarounds for this currently?

@gotson gotson linked a pull request Mar 7, 2023 that will close this issue
gotson pushed a commit that referenced this issue Mar 11, 2023
@github-actions github-actions bot added the released Issue has been released label Mar 21, 2023
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in 3.41.0.1 (Release Notes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement:SQLite Enhancement about sqlite features good first issue Good first issue for new contributors released Issue has been released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants