#23263: add migrate --dry-run and --verbose to show database changes in SQL
-----------------------------+----------------------
     Reporter:  wizpig64     |      Owner:  nobody
         Type:  New feature  |     Status:  new
    Component:  Migrations   |    Version:  1.7-rc-2
     Severity:  Normal       |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0            |      UI/UX:  0
-----------------------------+----------------------
 makemigrations has --dry-run and --verbosity 3, but that's for seeing what
 migrations will be generated, not the SQL itself.

 According to Andrew in this south ticket, it may be a harder question than
 it appears at first glance, because the actual SQL isn't known until it
 can ask the database a few things, and showing SQL for multiple changes
 would be a big mess too: http://south.aeracode.org/ticket/480

 Being able to inspect the SQL to be run is a crucial feature for a
 migration tool. Fooling around with 1.7rc2's migrations so far, I've run a
 few initial migrations on a test database that have changed columns in
 ways that were never told to me. Undoing those migrations *dropped the
 tables*, and I didn't know about it until my applications started
 complaining. I admit, these unexpected changes are mostly likely due to
 how my models weren't 100% accurate to the tables created outside of
 django by legacy software. I don't blame django for them.

 For now though, I'm uncomfortable running any migrations without knowing
 exactly what they're going to do. This feature probably isn't needed by
 people running apps that are and always have been 100% django. But as
 someone in the trenches dealing with messy data structures from decades
 ago, I need a tool that will help me manage my data structures, not one
 that will obscure them from me. So for now, I'll stick to diffing between
 sqlall outputs, as tedious as it is. Thanks.

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

Reply via email to