#31765: schema.tests.SchemaTests.test_db_table fails on MacOS -------------------------------+-------------------------------------- Reporter: Tom Forbes | Owner: Tom Forbes Type: Bug | Status: new Component: Uncategorized | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by Carlton Gibson): OK, I found it. It's to do with the `legacy_alter_table` config option. ([https://www.sqlite.org/pragma.html#pragma_legacy_alter_table docs]): {{{ sqlite> .dbconfig ... legacy_alter_table on ... sqlite> PRAGMA legacy_alter_table = off; sqlite> .dbconfig ... legacy_alter_table off ... sqlite> CREATE TABLE ATOMIC_RENAME_TEST(id INT); sqlite> CREATE TABLE ATOMIC_RENAME_TEST_2(one INT, FOREIGN KEY(one) REFERENCES ATOMIC_RENAME_TEST(id)); sqlite> ALTER TABLE ATOMIC_RENAME_TEST RENAME TO ATOMIC_RENAME_TEST_3; sqlite> .schema CREATE TABLE IF NOT EXISTS "ATOMIC_RENAME_TEST_3"(id INT); CREATE TABLE ATOMIC_RENAME_TEST_2(one INT, FOREIGN KEY(one) REFERENCES "ATOMIC_RENAME_TEST_3"(id)); }}} Not sure (yet) why (or where) this defaults to `on` for macOS but we can configure the connection on creation. -- Ticket URL: <https://code.djangoproject.com/ticket/31765#comment:17> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/061.baa2278b3707a5538ea810a860bfab10%40djangoproject.com.