Ticket #13967: mysql-spatial-index.patch
File mysql-spatial-index.patch, 651 bytes (added by , 14 years ago) |
---|
-
django/contrib/gis/db/backends/mysql/creation.py
old new class MySQLCreation(DatabaseCreation): 6 6 from django.contrib.gis.db.models.fields import GeometryField 7 7 output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style) 8 8 9 if isinstance(f, GeometryField) :9 if isinstance(f, GeometryField) and f.spatial_index: 10 10 qn = self.connection.ops.quote_name 11 11 db_table = model._meta.db_table 12 12 idx_name = '%s_%s_id' % (db_table, f.column)