sqlalchemy / sqlalchemy/alembic
CLI "Approve Migration? (y/n)"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 375
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI entry point for alembic downgrade -1 and trace how the migration plan is displayed and executed. Define the confirmation behavior for destructive downgrades, including the proposed -auto-approve path, and consider the existing script-compatibility requirement as the completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlalchemy
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100