Opened 10 years ago

Last modified 10 years ago

#23966 closed Cleanup/optimization

Pre-migrate database requirements enhancement — at Initial Version

Reported by: Kenial Sookyum Lee Owned by: nobody
Component: Database layer (models, ORM) Version: 1.7
Severity: Normal Keywords: migrate BaseDatabaseWrapper spatialite
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top