Skip to content

Make destructive commands such as migrate/createcachetable interactive by default to prevent accidental executions #167

Description

@ankitsmt211

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

User confirmation prompt for desctructive commands migrate and createcachetable, which can be bypassed using -no--input flag

Problem

python manage.py migrate 

is a subset of

python manage.py migrate --plan

A preview command is walking into destructive territory which has no safety rails, accidentaly execution can lead to unnecessarily painful experience. Not to mention explicit consent/cofirmation is a UX for destructive commands in place which some of the management commands already follow.

Request or proposal

proposal

Additional Details

This proposal is evolved from initial discussion, here's more information #163

Note: flush/collectstatic already follow proposed pattern

Implementation Suggestions

User executes:

python manage.py migrate

Prompted with: "This command can modify database. Are you sure you want to proceed ? [Y/N]

User executes:

python manage.py migrate -no--input

Migration is applied

Similar pattern will be followed for createcachetable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Idea

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions