#32184: `manage.py migrate --noinput` should not delete stale modules
-------------------------------------+-------------------------------------
               Reporter:  uy-        |          Owner:  nobody
  rrodriguez                         |
                   Type:  Bug        |         Status:  new
              Component:  Core       |        Version:  2.2
  (Management commands)              |       Keywords:  migrate, no-input,
               Severity:  Normal     |  noinput, management
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 When `manage.py migrate` is called with `--noinput` or `no-input`, it
 deletes stale modules by default. This is not documented in the official
 documentation (https://docs.djangoproject.com/en/2.2/ref/django-admin
 /#cmdoption-migrate-noinput) and it's a dangerous feature.

 Other tickets have mentioned the addition of parameters like `--force` to
 force the deletion. I think either that approach or the use of other
 parameters should be preferred.

 The ticket #25036 about deletion of stale content types was closed a long
 time ago without further comment, for which I assume the automatic
 deletion was discarded as dangerous.

 The ticket #29556 about having `--no-input` in `remove_stale_contenttypes`
 automatically remove the stale content types was closed as fixed. I wonder
 whether the changes to fix that ticket affected the behaviour of the
 `migrate` command...

 The tickets #29470 and #29026 comment about the output of the commands
 when `--no-input` is given. I think the output of `migrate` should list
 the stale elements without removing them.


 ''I'm recording this bug with a Django version of 2.2 because we cannot
 use a newer release (issues with other libraries). But, as I haven't found
 any mention about this specific issue in other places, and the
 documentation part has not been changed between 2.2 and 3.1, I think the
 bug is still present (or at least the documentation is not specific about
 it).''

 Thank you for your time.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32184>
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/056.10e8ad5cba0dcfcaefc85653f5833a97%40djangoproject.com.

Reply via email to