Skip to content

Return exit code from alembic #8

Open
@trilader

Description

@trilader

I had an error in a migration and I noticed that Flask-DB discards the exit code from alembic.

You can test this easily by putting, e.g., raise ValueError("This should fail") into a migrations upgrade method. When running alembic upgrade head directly the process exits with 1. When running flask db migrate upgrade head the exception gets printed but the commands exit code is set to 0. This is an issue when running database migrations with a configuration management system, in my case Ansible, as the error will silently be ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions