Replies: 2 comments 1 reply
-
Can anybody explain why the example works but this code does not? I don't get it. It looks the same to me. And somehow I don't get it why people are actually using rust with this kind of constant torture. Edit: Wtf... somehow the path created this trait problem. It does not make any sense to me. It doesn't like the migration in the folder, but why not is of course not explained because this language and everything surrounding it is actually made for bean counters. My Code: async fn run_migrations(rocket: Rocket<Build>) -> fairing::Result {
if let Some(db) = Db::fetch(&rocket) {
sqlx::migrate!("db/migrations")
.run(&**db)
.await?;
Ok(rocket)
} else {
Err(rocket)
}
} Error:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having a hard time trying to get sqlx migrations to run. Is there an example somewhere I can follow? The first challenge was getting a db connection from inside a fairing, but the two let db and let conn statements seem to be doing a good job of that.
Calling migrate!().run generates this compile-time error:
Beta Was this translation helpful? Give feedback.
All reactions