Changes between Version 2 and Version 3 of Ticket #35902, comment 1
- Timestamp:
- Nov 10, 2024, 11:36:22 AM (4 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35902, comment 1
v2 v3 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. 10 11 The best available options at this time for Postgres users running into this problem is to use the `TEST_TEMPLATE` [https://docs.djangoproject.com/en/5.1/ref/settings/#template database setting] to point it at a pre-configured database with extensions already installed on it. 12 13 14 {{{#!python 15 DATABASES = { 16 "default": { 17 "ENGINE": "django.db.backends.postgresql", 18 "USER": "user", 19 "NAME": "database", 20 "TEST": { 21 "TEMPLATE": "testtemplate", # testtemplate is meant to be a blank database with extensions already installed 22 }, 23 }, 24 } 25 }}}