#24424: Removing a model's last field results in SQL syntax error on SQLite
----------------------------+------------------------------------
     Reporter:  adnam       |                    Owner:
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.7
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  1           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  1
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by MarkusH):

 Hi jwineinger, thanks for taking a shot at this. I've been playing around
 with that idea as well, though I don't see how your solution can solve the
 problem of replacing primary keys, i.e. changing the `OneToOneField` of a
 multi table inheritance into a `AutoField`. Furthermore, it is not about a
 `DeleteModel` operation following a `RemoveField`. That could just remove
 that field, I think.

 The last half-done idea I had was something along those lines:
 1. dropping the old field's constraints (primary key, foreign key, ...)
 2. adding the new field
 3. adding the new field's pk constraint
 4. removing the old field

 Though I have no idea how this is going to work out, if at all.

--
Ticket URL: <https://code.djangoproject.com/ticket/24424#comment:20>
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/063.cfe73883b7104c2ef5c3e363860818e5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to