#30664: SQLite3 migrations can fail when used quoted db_table.
-------------------------------------+-------------------------------------
     Reporter:  Maciej Olko          |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Migrations           |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  quoted, db_table,    |             Triage Stage:  Accepted
  meta, model, sqlite3, syntax-      |
  error                              |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * cc: Simon Charette (added)
 * version:  2.2 => master
 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report. I was able to reproduce this issue with
 `AddField()` when adding a new `ForeignKey` but probably few more
 operations are affected because
 
[https://github.com/django/django/blob/3c6d32e0b233bc44eb4533f81819353036ae35e4/django/db/backends/sqlite3/schema.py#L139-L304
 _remake_table()] is used widely in the SQLite backend. This should be easy
 to fix by unquoting
 
[https://github.com/django/django/blob/3c6d32e0b233bc44eb4533f81819353036ae35e4/django/db/backends/sqlite3/schema.py#L266
 db_table].



 Reproduced at 4122d9d3f1983eea612f236e941d937bd8589a0d.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30664#comment:2>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ba91ea19fa5abebf5cb1e0dccbc3bc5e%40djangoproject.com.

Reply via email to