#24820: Add functionality to handle keyboard prompts during migrations for automated deployments -------------------------------------+------------------------------------- Reporter: Protosac | Owner: nobody Type: New feature | Status: new Component: Migrations | Version: 1.7 Severity: Normal | Resolution: Keywords: migration, | Triage Stage: automatic deployment | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Protosac):
* needs_docs: => 0 * needs_tests: => 0 * needs_better_patch: => 0 Old description: > While removing models in one of my migrations, I was prompted by Django > to input yes/no. For development, this is no problem. For automatic > deployments it is. > > I want to know if there exists or if it's possible to add functionality > to Django to do this. I've created a modification which works, but also > want to learn if anyone else has solved this problem differently. > > Modifying the deployment file to include `--noinput` does not solve this > problem (it basically defaults to `no` which ultimately doesn't remove > the model). > > The patch I've created seems to be working just fine. My solution > involves editing the contenttypes to take an additional argument. The > argument can be invoked inside your migration file so that I have full > control over when it's used. You can view the code below. > > Link to diff for the patch I created: > https://github.com/Protosac/django/commit/d98fff8219469a363493e8d8455c7ffb2430d36f New description: While removing models in one of my migrations, I was prompted by Django to input yes/no. For development, this is no problem. For automatic deployments it is. I want to know if there exists or if it's possible to add functionality to Django to do this. I've created a modification which works, but also want to learn if anyone else has solved this problem differently. Modifying the deployment file to include `--noinput` does not solve this problem (it basically defaults to `no` which ultimately doesn't remove the model). The patch I've created seems to be working just fine. My solution involves editing the contenttypes to take an additional argument. The argument can be invoked inside a migration file so that I have full control over when it's used. You can view the code below. Link to diff for the patch I created: https://github.com/Protosac/django/commit/d98fff8219469a363493e8d8455c7ffb2430d36f -- -- Ticket URL: <https://code.djangoproject.com/ticket/24820#comment:1> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.77abc6eaa6c49016f466a4786790f68c%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.