New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to determine if there are pending migrations #811

Closed
sgrif opened this Issue Mar 18, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@sgrif
Member

sgrif commented Mar 18, 2017

Probably something like migrations::any_pending_migrations(conn: MigrationConnection) -> bool. Should just return true or false based on if there are any migrations that haven't been run.

Ref rust-lang/crates.io#638

@sgrif sgrif added this to the 0.13 milestone Mar 18, 2017

DorianListens added a commit to DorianListens/diesel that referenced this issue Mar 21, 2017

Add function to check for pending migrations
This change introduces the function any_pending_migrations, which
returns a `Result` wrapping a `bool`, which will be true if there are
any pending migrations, and false if there are none. `Err` states
indicate problems with the migration setup.

Currently, it introduces some moderate code duplication in
migrations/mod.rs, as it shares logic with the code to actually run the
migrations, but the APIs don't match nicely, and I don't know enough
about the system to make changes to exisiting public API.

Fixes diesel-rs#811

DorianListens added a commit to DorianListens/diesel that referenced this issue Mar 22, 2017

Add function to check for pending migrations
This change introduces the function any_pending_migrations, which
returns a `Result` wrapping a `bool`, which will be true if there are
any pending migrations, and false if there are none. `Err` states
indicate problems with the migration setup.

Fixes diesel-rs#811

DorianListens added a commit to DorianListens/diesel that referenced this issue Mar 24, 2017

Add function to check for pending migrations
This change introduces the function any_pending_migrations, which
returns a `Result` wrapping a `bool`, which will be true if there are
any pending migrations, and false if there are none. `Err` states
indicate problems with the migration setup.

Fixes diesel-rs#811

DorianListens added a commit to DorianListens/diesel that referenced this issue Apr 26, 2017

Add function to check for pending migrations
This change introduces the function any_pending_migrations, which
returns a `Result` wrapping a `bool`, which will be true if there are
any pending migrations, and false if there are none. `Err` states
indicate problems with the migration setup.

Fixes diesel-rs#811

DorianListens added a commit to DorianListens/diesel that referenced this issue Apr 26, 2017

Add function to check for pending migrations
This change introduces the function any_pending_migrations, which
returns a `Result` wrapping a `bool`, which will be true if there are
any pending migrations, and false if there are none. `Err` states
indicate problems with the migration setup.

Fixes diesel-rs#811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment