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: Ian 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 Changed 14 years ago by mal

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 Changed 14 years ago by Ian Kelly

Cc: Ian Kelly Matt Boersma added

comment:3 Changed 14 years ago by jbronn

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 Changed 14 years ago by jbronn

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 Changed 14 years ago by jbronn

(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 Changed 12 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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