Changes between Initial Version and Version 1 of Ticket #35902, comment 1


Ignore:
Timestamp:
Nov 10, 2024, 11:23:43 AM (4 days ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35902, comment 1

    initial v1  
    55The ''problem'' here is that `migrate --run-syncdb`, which is relied upon by [https://github.com/django/django/blob/40bfd7b09aa0907b143e96f0b055538f476e544e/django/db/backends/base/creation.py#L68-L84 test database creation], has absolutely no knowledge of database migration operations that don't relate directly to models by design. All it does is [https://github.com/django/django/blob/40bfd7b09aa0907b143e96f0b055538f476e544e/django/core/management/commands/migrate.py#L434-L489 create models].
    66
    7 To confirm the issue is not specific to `TEST_MIGRATE=False` try settings `MIGRATION_MODULES` entries to `None` for each of your `INSTALLED_APPS` and running `migrate --sync-db` against a fresh database, you should see the exact same failure.
     7To confirm the issue is not specific to `TEST_MIGRATE=False` try settings `MIGRATION_MODULES` entries to `None` for each of your `INSTALLED_APPS` and running `migrate --run-syncdb` against a fresh database, you should see the exact same failure.
    88
    99Even if we wanted to only solve the problem for `TEST_MIGRATE=False` the proposed solution seems brittle as it requires the migrations to be fully applied on the non-test database (for extensions to exists) which might the case for local development setups but definitely not the case on CI setups where only the test database is created.
Back to Top