#34866: Cannot inspect migrations that resolve (sqaush) previous migrations
--------------------------------------------+------------------------
               Reporter:  Giovanni Allegri  |          Owner:  nobody
                   Type:  Uncategorized     |         Status:  new
              Component:  Migrations        |        Version:  4.2
               Severity:  Normal            |       Keywords:
           Triage Stage:  Unreviewed        |      Has patch:  0
    Needs documentation:  0                 |    Needs tests:  0
Patch needs improvement:  0                 |  Easy pickings:  1
                  UI/UX:  0                 |
--------------------------------------------+------------------------
 Commit
 
https://github.com/django/django/commit/d88365708c554efe3c786c3be6da1d9de916360f
 forces MigrationLoader with replace_migrations=False. This is fine to
 inspect squashed migrations, as requested in
 https://code.djangoproject.com/ticket/31318.

 However, in case the squashed migrations remove a model or a field, the
 command breaks when it reaches the migration that replaces the squashed
 migrations. since this will try to modify a model that was already removed
 (by the squashed migrations).

 I propose to make the replace_migrations controllable with a parameter to
 sqlmigrate. If not set the option will be False (as it is now by default).
 The following command would make sqlmigrate replace squashed migrations:


 {{{
 django-admin sqlmigrate --replace-migrations ...
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34866>
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/0107018abc973fa9-a912bdbe-c476-4888-a65d-af05c096b883-000000%40eu-central-1.amazonses.com.

Reply via email to