Opened 10 years ago

Last modified 10 years ago

#21426 closed Uncategorized

No indexes are created on syncdb — at Initial Version

Reported by: burton449geo@… 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

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)

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top