Skip to content

Counterintuitive mix ecto.rollback interface #336

@n-epifanov

Description

@n-epifanov

Current behavior

$ mix ecto.rollback --to 20210604145227
12:15:35.434 [info]  == Running 20210617143138 [...] backward
12:15:35.444 [info]  alter table o[...]
12:15:35.471 [info]  == Migrated 20210617143138 in 0.0s
12:15:35.483 [info]  == Running 20210604145227 [...] backward
12:15:35.483 [info]  drop index dial_[...]_index
12:15:35.484 [info]  drop table dial_[...]
12:15:35.486 [info]  == Migrated 20210604145227 in 0.0s

Migration specified with to is also being rolled back.

Expected behavior

mix ecto.rollback leaves a repo exactly at to migration, i.e. it does "rollback to" specified revision.

That would make more sense, right?
(It would be a one-character fix PR, I guess.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions