Changes between Version 6 and Version 7 of Ticket #35902, comment 1
- Timestamp:
- Nov 10, 2024, 11:40:32 AM (4 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35902, comment 1
v6 v7 5 5 The ''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. All it does is [https://github.com/django/django/blob/40bfd7b09aa0907b143e96f0b055538f476e544e/django/core/management/commands/migrate.py#L434-L489 create models] by design. 6 6 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 --run-syncdb` against a fresh database, you should see the exact same failure.7 To confirm the issue is not specific to `TEST_MIGRATE=False` yourself, 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. 8 8 9 9 Even 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 and be introspected) which might the case for local development setups but definitely not the case on CI setups where only the test database is created.