Skip to content

Allow passing --ignore-missing to sqlx::migrate! macro #1788

Open
@nipunn1313

Description

@nipunn1313

The CLI's sqlx migrate run has a --ignore-missing flag which I'd love to be able to pass to the migrate macro.
Currently the migrate macro hardcodes ignore_missing: false

Currently it's used as such:

static MIGRATOR: Migrator = sqlx::migrate!();

It is possible to do it like this

static MIGRATOR: Migrator = {
    let mut m = sqlx::migrate!();
    m.ignore_missing = true;
    m
};

Would like something more ergonomic

Metadata

Metadata

Assignees

No one assigned

    Labels

    migrationsProposals or bugs involving migrations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions