--prune should take app_label into account then checking squashed migrations.
Considering that entering the app label is mandatory when running migrate command with --prune, it is ignored during command execution and some pre-conditions are checked globally.
there are some apps that are actually third-party and we don't have any control on them. if I want to prune migration only for my specific app, I get this error:
Cannot use --prune because the following squashed migrations have their 'replaces' attributes and may not be recorded as applied:
social_django.0001_initial
social_django.0004_auto_20160423_0400
social_django.0003_alter_email_max_length
social_django.0002_add_related_name
social_django.0005_auto_20160727_2333
social_django is a third party app that I don't have any control on that. But in prune command I used orders
app this my app. So it seems some preconditions are checking globally instead of checking based on app.
Change History
(7)
Cc: |
Jacob Walls added
|
Has patch: |
set
|
Needs tests: |
set
|
Owner: |
changed from nobody to Moein Bbp
|
Status: |
new → assigned
|
Summary: |
Migrate prune command → --prune should take app_label into account then checking squashed migrations.
|
Triage Stage: |
Unreviewed → Accepted
|
Patch needs improvement: |
set
|
Needs tests: |
unset
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Thanks for the report.
PR