Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dry-run option? #84

Open
rod-glover opened this issue Apr 29, 2021 · 0 comments
Open

Add dry-run option? #84

rod-glover opened this issue Apr 29, 2021 · 0 comments

Comments

@rod-glover
Copy link
Contributor

Performing a dry run was recently suggested. Alembic doesn't provide this ability directly.

Alembic does, of course, perform migration actions inside a transaction; if any error occurs during the migration, the transaction is rolled back. However, that is not a dry run.

This SO answer shows how to do it; basically enclose the dry run in a transaction and always roll it back. This will at least show Alembic's output of what would happen on a successful real migration. We should look into what level of detail (verbosity, debug output) Alembic can provide and turn that on appropriately for dry runs. The default level of Alembic output is terse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant