-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cannot run migration with migrate! macro #746
Comments
Try |
|
Could we get a list of your migration file names? |
Are you on Windows? That would explain that error. I thought we were normalizing paths for the OS though. |
Was using a non integer prefix for the migration file. Thanks |
I think I'm going to close this, perhaps another issue should be opened to make the migration naming format more obvious? |
wait a second, got a mixup, uhh, @esemeniuc is everything okay on your end? |
It works with |
Fixes issue experienced in launchbadge#746 when using no parameter: ``` error: paths relative to the current file's directory are not currently supported --> src/db.rs:7:5 | 7 | sqlx::migrate!().run(&conn).await?; | ^^^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) ```
Fixes issue experienced in #746 when using no parameter: ``` error: paths relative to the current file's directory are not currently supported --> src/db.rs:7:5 | 7 | sqlx::migrate!().run(&conn).await?; | ^^^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) ```
Thank you, from the documentation it was somewhat confusing to figure out that:
|
The documentation uses
, which doesn't work due to the reason discussed in this issue. |
When running
sqlx::migrate!("migrations").run(&conn).await?;
, I get this output:I get this result on rust 1.47 and 1.49 nightly. This is my Cargo.toml entry:
sqlx = { version = "0.4.0-beta.1", features = [ "macros", "sqlite", "chrono", "migrate" ] }
Running
sqlx::migrate!("/").run(&conn).await?;
results inAll my work is based on this documentation: https://docs.rs/sqlx/0.4.0-beta.1/sqlx/macro.migrate.html
The text was updated successfully, but these errors were encountered: