Opened 11 years ago
Last modified 11 years ago
#21426 closed Uncategorized
No indexes are created on syncdb — at Version 1
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | GIS | Version: | 1.5-rc-2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
the model is the following:
class Feature(models.Model): shapefile = models.ForeignKey(Shapefile) id_relat = models.IntegerField(db_index=True) geom_point = models.PointField(srid=3857, blank=True, null=True) geom_multipoint = models.MultiPointField(srid=3857, blank=True, null=True) geom_multilinestring = models.MultiLineStringField(srid=3857, blank=True, null=True) geom_multipolygon = models.MultiPolygonField(srid=3857, blank=True, null=True) geom_geometrycollection = models.GeometryCollectionField(srid=3857, blank=True, null=True) objects = models.GeoManager() def __unicode__(self): return str(self.id)
the error message on syncdb is the following (translated from french to english):
c:\mygeosite\geodjango>python manage.py syncdb Syncing... Creating tables ... Creating table shapefile_feature Installing custom SQL ... Installing indexes ... Failed to install index for shapefile.Feature model: ERROR: field « geom _point » of the relation « shapefile_feature already exists CONTEXT: instruction SQL « ALTER TABLE public.shapefile_feature ADD COLUMN geo m_point geometry(Point, 3857) » fonction PL/pgsql addgeometrycolumn(character varying,character varying,characte r varying,character varying,integer,character varying,integer,boolean), line 11 0 à instruction EXECUTE instruction SQL « SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5, $6) » fonction PL/pgsql addgeometrycolumn(character varying,character varying,integer, character varying,integer,boolean), line 5 à instruction SQL Installed 0 object(s) from 0 fixture(s)
Note:
See TracTickets
for help on using tickets.
The traceback is rather difficult to read with all the random unicode characters but the error basically looks like: 'field "geom_point" of the relation "shapefile_feature" already exists'.
What GIS database and version are you using?
I wonder if #20968 may be related.