Odonno / surrealdb-migrations

An awesome SurrealDB migration tool, with a user-friendly CLI and a versatile Rust library that enables seamless integration into any project.
https://crates.io/crates/surrealdb-migrations
MIT License
210 stars 16 forks source link

Running `cargo install surrealdb-migrations' fails #81

Closed AlexandreRoba closed 5 months ago

AlexandreRoba commented 5 months ago

Tried to replace the cli 1.2 with the release of yesterday 1.3.0:

cargo install surrealdb-migrations

got this:

Compiling surrealdb v1.3.1
error: `sql2` is currently unstable. You need to enable the `surrealdb_unstable` flag to use it.
   --> /Users/aroba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/surrealdb-1.3.1/src/lib.rs:117:1
    |
117 | / compile_error!(
118 | |     "`sql2` is currently unstable. You need to enable the `surrealdb_unstable` flag to use it."
119 | | );
    | |_^

error: could not compile `surrealdb` (lib) due to 1 previous error
error: failed to compile `surrealdb-migrations v1.3.0`, intermediate artifacts can be found at `/var/folders/4s/x3c9vc_12293cn0v02_4bjj80000gn/T/cargo-install0ELWRR`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
AlexandreRoba commented 5 months ago

I tried to reinstall the previous version using:

cargo install surrealdb-migrations --version 1.2.3

but got this error:

error: `sql2` is currently unstable. You need to enable the `surrealdb_unstable` flag to use it.
   --> /Users/aroba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/surrealdb-1.4.0/src/lib.rs:127:1
    |
127 | / compile_error!(
128 | |     "`sql2` is currently unstable. You need to enable the `surrealdb_unstable` flag to use it."
129 | | );
    | |_^

error: could not compile `surrealdb` (lib) due to 1 previous error
error: failed to compile `surrealdb-migrations v1.2.3`, intermediate artifacts can be found at `/var/folders/4s/x3c9vc_12293cn0v02_4bjj80000gn/T/cargo-install72e6WG`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

I'm now in trouble as I need to deply a new version of our app this we :'(

Odonno commented 5 months ago

Hello Alexandre,

This is due to features only available under sql2. Here is the solution to install:

https://github.com/Odonno/surrealdb-migrations/issues/77#issuecomment-1989564825

Odonno commented 5 months ago

Pinned for reference.