#24424: Migrating an 'empty' model with SQLite gives an SQL syntax error
----------------------------+--------------------------------
     Reporter:  adnam       |      Owner:  nobody
         Type:  Bug         |     Status:  new
    Component:  Migrations  |    Version:  master
     Severity:  Normal      |   Keywords:  sqlite3 migrations
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0           |      UI/UX:  0
----------------------------+--------------------------------
 On migrating an empty, abstract model, the method

 `django.db.backends.sqlite3.schema.DatabaseSchemaEditor._remake_table()`

 tries to execute the following SQL query:

 `INSERT INTO "companies_department__new" () SELECT  FROM
 "companies_department";`

 The correct SQL would be:

 `INSERT INTO "companies_department__new" SELECT * FROM
 "companies_department";`

 This appears to be the same problem specified in this ticket from South:
 http://south.aeracode.org/ticket/570 (see comment #15 at the bottom).

 Will provide the patch to fix this shortly. Any indication of how to
 create a test case would be appreciated.

--
Ticket URL: <https://code.djangoproject.com/ticket/24424>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.18c495d39cbe74f467815bbcb45836ae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to