#28542: migration that introduces uuid field is not reversible with unique=True
----------------------------+--------------------------------------
     Reporter:  karyon      |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.11
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Unreviewed
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+--------------------------------------
Changes (by Tim Martin):

 * cc: Tim Martin (added)


Comment:

 I can't reproduce this using django branch `stable/1.11.x` or `master`.
 With sqlite, the migration fails to apply forwards, with the error:

 {{{
 django.db.utils.OperationalError: duplicate column name: id
 }}}

 AFAICT, this is hitting after it has deleted the `id` field. I think this
 is happening because in sqlite you can't actually remove the `id` field
 from a table?

 With Postgres 9.6.5 and Django `stable/1.11.x` I can apply the migration
 forwards and backwards without a problem.

 Can you provide more details about the environment where this is failing?
 Perhaps the output of `pip freeze` so I can get the same versions of
 psycopg2 etc.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28542#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 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/064.5644c8117e45e7c1f4f9d861680dbb4a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to