mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 03:11:32 +00:00
find migrations dir in debug mode using CARGO_MANIFEST_DIR variable instead of current working directory
This commit is contained in:
parent
f044ef3321
commit
7308dc8632
1 changed files with 4 additions and 2 deletions
|
@ -39,8 +39,10 @@ fn migrations() -> diesel_migrations::EmbeddedMigrations {
|
|||
#[cfg(debug_assertions)]
|
||||
#[expect(clippy::expect_used)]
|
||||
fn migrations() -> diesel_migrations::FileBasedMigrations {
|
||||
diesel_migrations::FileBasedMigrations::find_migrations_directory()
|
||||
.expect("failed to get migration source")
|
||||
diesel_migrations::FileBasedMigrations::find_migrations_directory_in_path(env!(
|
||||
"CARGO_MANIFEST_DIR"
|
||||
))
|
||||
.expect("failed to get migration source")
|
||||
}
|
||||
|
||||
/// This SQL code sets up the `r` schema, which contains things that can be safely dropped and
|
||||
|
|
Loading…
Reference in a new issue