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 :)
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 :)