Opened 10 years ago
Last modified 10 years ago
#23966 closed Cleanup/optimization
Pre-migrate database requirements enhancement — at Initial Version
Description ¶
Some database backends has special requirements when the database gets migrated.
For example, when using django.contrib.gis.db.backends.spatialite as a backend, the database file should be initialized at first time with this command: "SELECT InitSpatialMetaData();"
Unless, it causes some error like https://code.djangoproject.com/ticket/20968.
I guess this would be appropriate: adding a before_migration() method to DatabaseWrapper, and letting database backends inherit it to do some jobs.