• Corey Bryant's avatar
    Use legacy_alter_table ON in sqlite recreate_table · 231a4d2a
    Corey Bryant authored
    Use "PRAGMA legacy_alter_table = ON" with sqlite >= 3.26 when
    using "ALTER TABLE RENAME TO migration_tmp" to maintain legacy
    behavior.
    
    As of sqlite version 3.26, when a table is renamed using
    "ALTER TABLE RENAME TO", REFERENCES clauses that refer to the
    table will be updated. To maintain legacy (3.24 and earlier)
    behavior, "PRAGMA legacy_alter_table" can be set to true and
    "PRAGMA foreign_keys" can be set to false. [1]
    
    [1] https://www.sqlite.org/src/info/ae9638e9c0ad0c36
    
    Thanks to "László Böszörményi (GCS)" <gcs@debian.org> for
    providing the code for this patch, which has since been
    slightly modified.
    
    Change-Id: I539988ab2ad6df6c8f423ecec15364ad8fcc7267
    Closes-Bug: 1807262
    231a4d2a
Name
Last commit
Last update
doc/source Loading commit data...
migrate Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.gitreview Loading commit data...
.testr.conf Loading commit data...
COPYING Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
TODO Loading commit data...
doc-requirements.txt Loading commit data...
requirements.txt Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...
test-requirements-py2.txt Loading commit data...
test-requirements-py3.txt Loading commit data...
test-requirements.txt Loading commit data...
test_db.cfg Loading commit data...
test_db_py3.cfg Loading commit data...
tox.ini Loading commit data...