Skip to content

requies minimum number of characters to match version numbers in commands #534

@claweyenuk

Description

@claweyenuk

Can version matching get more strict?

https://github.com/sqlalchemy/alembic/blob/master/alembic/script/revision.py#L376

Ideally, something like if len(resolved_id) < 3 set revs = [].

I went to downgrade an database, and accidentally typed alembic downgrade 1 instead of alembic downgrade -1 and happened to have a single revision start with a "1", so the downgrade continued.

DB migrations can result in data loss, I think it's ok to require a certain number of characters when identifying the migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    command interfaceuse casenot quite a feature and not quite a bug, something we just didn't think of

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions