#29182: SQLite 3.26 breaks database migration ForeignKey constraint, leaving <table_name>__old in db schema ----------------------------------+------------------------------------ Reporter: ezaquarii | Owner: nobody Type: Bug | Status: new Component: Migrations | Version: 2.1 Severity: Release blocker | Resolution: Keywords: sqlite migration | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------------+------------------------------------
Comment (by Chris Lamb): * Apologies for the dupe. I filed #30016after not reading the most-recent entries here more carefully... * I can reproduce with sqlite3 `3.26.0` (but not with `3.25.3`) However, the patch in https://code.djangoproject.com/ticket/29182#comment:12 does not work for me: {{{ test_testcase_ordering (test_runner.test_discover_runner.DiscoverRunnerTest) ... ok test_transaction_support (test_runner.tests.Sqlite3InMemoryTestDbs) Ticket #16329: sqlite3 in-memory test databases ... ERROR ====================================================================== ERROR: test_transaction_support (test_runner.tests.Sqlite3InMemoryTestDbs) Ticket #16329: sqlite3 in-memory test databases ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/lamby/git/debian/python-team/modules/python- django/tests/test_runner/tests.py", line 226, in test_transaction_support DiscoverRunner(verbosity=0).setup_databases() File "/home/lamby/git/debian/python-team/modules/python- django/django/test/runner.py", line 551, in setup_databases self.parallel, **kwargs File "/home/lamby/git/debian/python-team/modules/python- django/django/test/utils.py", line 174, in setup_databases serialize=connection.settings_dict.get('TEST', {}).get('SERIALIZE', True), File "/home/lamby/git/debian/python-team/modules/python- django/django/db/backends/base/creation.py", line 68, in create_test_db run_syncdb=True, File "/home/lamby/git/debian/python-team/modules/python- django/django/core/management/__init__.py", line 148, in call_command return command.execute(*args, **defaults) File "/home/lamby/git/debian/python-team/modules/python- django/django/core/management/base.py", line 353, in execute output = self.handle(*args, **options) File "/home/lamby/git/debian/python-team/modules/python- django/django/core/management/base.py", line 83, in wrapped res = handle_func(*args, **kwargs) File "/home/lamby/git/debian/python-team/modules/python- django/django/core/management/commands/migrate.py", line 172, in handle self.sync_apps(connection, executor.loader.unmigrated_apps) File "/home/lamby/git/debian/python-team/modules/python- django/django/core/management/commands/migrate.py", line 306, in sync_apps editor.create_model(model) File "/home/lamby/git/debian/python-team/modules/python- django/django/db/backends/base/schema.py", line 312, in create_model self.execute(sql, params or None) File "/home/lamby/git/debian/python-team/modules/python- django/django/db/backends/base/schema.py", line 118, in execute "Executing DDL statements while in a transaction on databases " django.db.transaction.TransactionManagementError: Executing DDL statements while in a transaction on databases that can't perform a rollback is prohibited. ---------------------------------------------------------------------- Ran 5020 tests in 138.176s FAILED (errors=1, skipped=657, expected failures=3) }}} -- Ticket URL: <https://code.djangoproject.com/ticket/29182#comment:22> 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 post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.41052a35cc4f14a12c1095589ef3565b%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.