Skip to content

Commit

Permalink
Fixed #13967 -- MySQL spatial backend now respects when `spatial_inde…
Browse files Browse the repository at this point in the history
…x=False`. Thanks, Simon Law, for bug report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jbronn committed Jul 21, 2010
1 parent 87a60e2 commit aaa5dfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/contrib/gis/db/backends/mysql/creation.py
Expand Up @@ -6,7 +6,7 @@ def sql_indexes_for_field(self, model, f, style):
from django.contrib.gis.db.models.fields import GeometryField
output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style)

if isinstance(f, GeometryField):
if isinstance(f, GeometryField) and f.spatial_index:
qn = self.connection.ops.quote_name
db_table = model._meta.db_table
idx_name = '%s_%s_id' % (db_table, f.column)
Expand Down

0 comments on commit aaa5dfb

Please sign in to comment.