#20968: Error creating Indexes on Syncdb
-------------------------------------+-------------------------------------
     Reporter:  burton449geo@…       |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  master
    Component:  GIS                  |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  geodjango,           |      Needs documentation:  0
  spatialite, indexes                |  Patch needs improvement:  0
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by kenial):

 If we're going with the hook, it still does "migrate" stuff in context of
 another application (in this case, gis). So hook isn't looking good. (is
 there a way to completely split into migrate and gis context in app
 initialization?)

 pre-migrate signal seems to be nice, but I find out ... it's `model`
 based. We're doing this on database-level. Maybe it's safe to be executed
 repeatedly, because when migrating only.

 My original approach was to add a method for this purpose (name was
 `before_migration`) to BaseDatabaseWrapper with empty implementation, and
 call it when running `migrate` command. For sure,
 `django.contrib.gis.db.backends.spatialite.base.DatabaseWrapper`
 implements this `before_migration` method to init metadata table.

--
Ticket URL: <https://code.djangoproject.com/ticket/20968#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/080.a2295ee485342bca844ebda0aad9976b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to