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 embedded_migrations! to check if migration is needed #1845

Closed
kpcyrd opened this Issue Sep 11, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@kpcyrd
Contributor

kpcyrd commented Sep 11, 2018

It seems right now two functions are exported in the module that is generated by embedded_migrations!:

  • run
  • run_with_output

I would like to have a 3rd function, along the lines of fn migrations_needed() -> bool, that can be used to check if migrations are available/needed.

The idea is that this function can be used to determine if embedded_migrations::run needs to be executed and also to inform the user that migrations are going to be executed:

if embedded_migrations::migrations_needed() {
    println!("executing migrations);
    embedded_migrations::run(&db)?;
}
@sgrif

This comment has been minimized.

Member

sgrif commented Sep 11, 2018

Thank you for the feature request. We're currently in the process of a cleanup of the issue tracker, and aren't currently accepting feature requests (there will be an official policy written soon, but the TL;DR is that open issues should reflect something that is a bug or on our immediate roadmap).

We're happy to discuss feature requests, but the place to do so is discourse.diesel.rs, not the issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment