Give database backends a "creation" attribute instead of using get_creation_module()
|Reported by:||Adrian Holovaty||Owned by:||brantley|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||Ian Kelly, Leo Soto M., ivan.illarionov@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||yes|
Each database backend's
DatabaseWrapper class should have a
creation property that returns a subclass of
django.db.backends.creation.BaseCreation, which contains all the information about how to create tables with the particular backend.
BaseCreation is like
django/db/backends/__init__.py, except it deals only with logic related to creation.
This was implemented in http://code.djangoproject.com/attachment/ticket/5106/backend-refactoring-v2-correct-bitrot.patch , but that patch is no longer valid, as some of it has been checked in already.
Change History (24)
comment:2 Changed 9 years ago by
|Patch needs improvement:||unset|