﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31693	Add setting to control installed PostgreSQL extensions.	Markus Bertheau	nobody	"In [https://code.djangoproject.com/ticket/25388 #25388] a [https://docs.djangoproject.com/en/dev/ref/settings/#migrate feature] was introduced to disable migrations for test databases. Before that it was possible to disable migrations for all apps with MIGRATION_MODULES, mapping every app to `None` ([https://docs.djangoproject.com/en/dev/ref/settings/#migration-modules as explained here]). Other code is used for example in pytest-django ([https://github.com/pytest-dev/pytest-django/blob/ee7858af1a80e0091af4d260c0a70e5766c1196a/pytest_django/migrations.py here] and [https://github.com/pytest-dev/pytest-django/blob/ee7858af1a80e0091af4d260c0a70e5766c1196a/pytest_django/fixtures.py#L156-L169 here]) to disable migrations in other ways. All for the speed-up in creating a database ""directly"" (circumventing migrations) as opposed to creating it with the migration mechanism.

Also, [https://docs.djangoproject.com/en/dev/ref/databases/#migration-operation-for-adding-extensions here] and [https://docs.djangoproject.com/en/dev/ref/contrib/postgres/operations/#creating-extension-using-migrations here] it is explained how extensions should be installed with a migration operation.

Both don't mix, because when disabling migrations, the extension doesn't get installed. Using features of the extension, for example column types, doesn't work.

As a side note: postgis functionality is provided through a separate database engine that provides its own `DatabaseWrapper` that takes care of installing the postgis extension, independent of the migration mechanism.

Maybe extensions should be configured in settings.DATABASES and then automatically installed by the postgresql engine."	Cleanup/optimization	closed	Migrations	dev	Normal	wontfix			Unreviewed	0	0	0	0	0	0
