Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#11969 closed (fixed)

Syncdb doesn't honor managed=False setting with Geodjango

Reported by: Jani Tiainen Owned by: nobody
Component: GIS Version: dev
Severity: Keywords:
Cc: Erin Kelly, Matt Boersma Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Geodjango "geomanager" based models do not honor "managed = False" setting but tries to forcefully create spatial index and insert spatial metadata in Oracle.

Change History (6)

comment:1 by mal, 14 years ago

It seems to happen when model (with spatial field) is based on the view.

When model points to the normal table (via db_table = 'my table') syncdb works alright (obeying "managed = False"), when it points to the view then syncdb keeps trying to install it, including attempts to create spatial medatada and spatial indexes.

Installing custom SQL for myapp.mymodel model
Failed to install custom SQL for myapp.mymodel model: ORA-13223: duplicate entry for <mytable>.location in SDO_GEOM_METADATA
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_GEOM_TRIG_INS1", line 48
ORA-04088: error during execution of trigger 'MDSYS.SDO_GEOM_TRIG_INS1'

comment:2 by Erin Kelly, 14 years ago

Cc: Erin Kelly Matt Boersma added

comment:3 by jbronn, 14 years ago

Keywords: oracle removed
milestone: 1.2
Summary: Syncdb doesn't honor managed=False setting with Oracle and GeodjangoSyncdb doesn't honor managed=False setting with Geodjango

This is currently fixed in trunk, because GeometryField no longer uses the post_create_sql hook. However, for API consistency I will commit a fix for the post_create_sql hook to both trunk and 1.1.X (which is still affected). Moreover, this is not an Oracle-specific bug, as it affects all backends.

comment:4 by jbronn, 14 years ago

Resolution: fixed
Status: newclosed

(In [12313]) Fixed #11969 -- Field.post_create_sql hook should not be called for unmanaged models. Thanks, jtiai for report.

comment:5 by jbronn, 14 years ago

(In [12314]) [1.1.X] Fixed #11969 -- Field.post_create_sql hook should not be called for unmanaged models. Thanks, jtiai for report.

Backport of r12313 from trunk.

comment:6 by Jacob, 12 years ago

milestone: 1.2

Milestone 1.2 deleted

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