Skip to content
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

[minor] sqlx-cli links to (a bit outdated) docs.rs page #2435

Closed
adsick opened this issue Mar 29, 2023 · 0 comments · Fixed by #2900
Closed

[minor] sqlx-cli links to (a bit outdated) docs.rs page #2435

adsick opened this issue Mar 29, 2023 · 0 comments · Fixed by #2900
Labels

Comments

@adsick
Copy link

adsick commented Mar 29, 2023

Bug Description

when running migration for the first time you get a greeting message:

❯ sqlx migrate add create_students_table
Creating migrations/20230329125012_create_students_table.sql

Congratulations on creating your first migration!

Did you know you can embed your migrations in your application binary?
On startup, after creating your database connection or pool, add:

sqlx::migrate!().run(<&your_pool OR &mut your_connection>).await?;

Note that the compiler won't pick up new migrations if no Rust source files have changed.
You can create a Cargo build script to work around this with `sqlx migrate build-script`.

See: https://docs.rs/sqlx/0.5/sqlx/macro.migrate.html

the problem is that https://docs.rs/sqlx/0.5/sqlx/macro.migrate.html will be outdated at some point, maybe better use https://docs.rs/sqlx/latest/sqlx/macro.migrate.html ?

this line in the code:

See: https://docs.rs/sqlx/0.5/sqlx/macro.migrate.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant