#28809: Changing SRID on geometry field doesn't create working migration
--------------------------------+------------------------------------
Reporter: Jani Tiainen | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: migrations gis | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------
Changes (by Claude Paroz):
* version: 1.11 => master
* component: Database layer (models, ORM) => GIS
* stage: Unreviewed => Accepted
Comment:
Changing the SRID of a field is something that's hard to do when you have
existing content. I don't think databases are doing anything clever when
you do that (e.g. they don't convert the existing values, AFAIK). Probably
the best strategy is to create a new column, move the values, converting
them in the new SRID in the process, and delete the old column. The
strategy might differ depending on the backend.
--
Ticket URL: <https://code.djangoproject.com/ticket/28809#comment:1>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.afe3a89a95c99e304103674552195082%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.