#25492: warn about migrations mixing schema- and data- changing operations
--------------------------------------+------------------------------------
     Reporter:  tarkatronic           |                    Owner:  nobody
         Type:  New feature           |                   Status:  new
    Component:  Core (System checks)  |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by shaib):

 * cc: shaib (added)


Comment:

 Replying to [comment:4 tarkatronic]:
 > An alternative which was suggested, in regards to my specific case, was
 to split the data and schema operations into separate transactions, or
 even separate migrations. Would something like that be a possibility?

 If you're thinking about some automatic process to do the splitting into
 migrations, I don't think that's a very good idea. Remember, to get the
 problem in the first place, the migration needs to have been edited by the
 user. This means that, in order to generate the separate migration files,
 we'd need to parse and understand their code, and I suspect the fringe
 cases where this would break (not as in "error out", but as in "generate
 wrong code") are many and hard to detect.

--
Ticket URL: <https://code.djangoproject.com/ticket/25492#comment:6>
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/069.8b1b8970fdd4ab06c49db907ae0c2c72%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to