Skip to content

sqlx::migrate!() doesn't seem to fire #2427

Answered by abonander
twiclo asked this question in Q&A
Discussion options

You must be logged in to vote

You need to call .run(&mut some_connection).await()? on the result of sqlx::migrate!() to actually execute migrations, see the docs: https://docs.rs/sqlx/latest/sqlx/macro.migrate.html

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by abonander
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #2421 on March 24, 2023 21:28.