Opened 9 years ago

Last modified 9 years ago

#24820 closed New feature

Add functionality to handle keyboard prompts during migrations for automated deployments — at Version 1

Reported by: Kay Owned by: nobody
Component: Migrations Version: 1.7
Severity: Normal Keywords: migration, automatic deployment
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Kay)

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

Change History (1)

comment:1 by Kay, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top