Comment 19 for bug 1807262

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sqlalchemy-migrate (master)

Reviewed: https://review.openstack.org/623564
Committed: https://git.openstack.org/cgit/openstack/sqlalchemy-migrate/commit/?id=231a4d2ae9f8496cfc8eea2e6bb8186a0dd602f9
Submitter: Zuul
Branch: master

commit 231a4d2ae9f8496cfc8eea2e6bb8186a0dd602f9
Author: Corey Bryant <email address hidden>
Date: Fri Dec 7 13:49:20 2018 -0500

    Use legacy_alter_table ON in sqlite recreate_table

    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)" <email address hidden> for
    providing the code for this patch, which has since been
    slightly modified.

    Change-Id: I539988ab2ad6df6c8f423ecec15364ad8fcc7267
    Closes-Bug: 1807262