#24180: Table created incorrectly on AddGeometryColumn error
----------------------------+--------------------
     Reporter:  manelclos   |      Owner:  nobody
         Type:  Bug         |     Status:  new
    Component:  GIS         |    Version:  1.7
     Severity:  Normal      |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0           |      UI/UX:  0
----------------------------+--------------------
 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.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24180>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.7649874a064e319c22dd279ce8c7630b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to