Skip to content

Running with --only should not fail if migration has already been run #18

Description

@chadxz

When a migration has already been run, right now it bails out saying that the specified migration is not pending, and exits with an error status.

I think in a scenario where the specified migration doesn't exist, it makes sense to exit with an error status. But if the migration does exist and has already been run, I think it would make sense for the app to simply say "migration already applied" and exit with a success status. If the migration is already applied, the goal of running the command is already accomplished, so it isn't an error right?

This seems to be the logic that works for up... if you're already at the latest migration, then it simply does nothing and exits with a success status. I'm thinking this logic should be extended to running with --only as well.

LMK what you think.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions