﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24180	Table created incorrectly on AddGeometryColumn error	Manel Clos	nobody	"Hi, when using 'manage.py migrate' and an error happens creating the geometry column, the new table will be incorrectly created with the geometry field missing.

{{{
  Creating tables...
    Creating table myapp_mymodel
  Installing custom SQL...
  Installing indexes...
    Failed to install index for myapp.MyModel model: permission denied for relation spatial_ref_sys
CONTEXT:  SQL statement ""SELECT SRID FROM spatial_ref_sys WHERE SRID =  $1 ""
PL/pgSQL function ""addgeometrycolumn"" line 74 at SQL statement
SQL statement ""SELECT AddGeometryColumn('','', $1 , $2 , $3 , $4 , $5 )""
PL/pgSQL function ""addgeometrycolumn"" line 5 at SQL statement
}}}

Running 'manage.py migrate' again:
{{{
Operations to perform:
  Synchronize unmigrated apps: gis, myapp
  Apply all migrations: contenttypes, sites, auth, sessions
Synchronizing apps without migrations:
  Creating tables...
  Installing custom SQL...
  Installing indexes...
Running migrations:
  No migrations to apply.
  Your models have changes that are not yet reflected in a migration, and so won't be applied.
  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
}}}
"	Bug	closed	GIS	1.7	Normal	invalid			Unreviewed	0	0	0	0	0	0
