Skip to content

CLI "Approve Migration? (y/n)" #540

@wollerman

Description

@wollerman

Because of the potentially destructive nature of downgrading, it may be useful for the CLI to verify the migration that's going to take place on the particular database/environment. e.g.

$ alembic downgrade -1
Planned downgrade for environment PROD: 5a79c370e145 -> 42f6b68fe138, setup table ABC
Please type 'yes' to continue with migration.

An example of this would be Terraform's apply command that shows the planned changes and requires user confirmation with a yes to actually perfom. To provide compatibility for those using migrations in scripts, a CLI flag for -auto-approve could also be added.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions