Because of a change in the underlying way that SurrealDB stores data in this update, and issues with exporting specific data from
1.0.0-beta.8, there are extra steps required to migrate to
- A change in the underlying way data is stored in SurrealDB was caused by this commit. Data will need to be exported as SQL and imported into
"character was not yet properly escaped. This was fixed somewhere during the development for
\character is often used as an escape character, but in an export this is not always properly escaped. This was only recently discovered and is not yet fixed.
Do I have this issue?
An error, similar to the following, will be thrown when connecting to the database or when selecting specific data, if you are experiencing this issue.
Error: thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: Syntax("invalid type: string "Float", expected a boolean")', lib/src/sql/statements/define.rs:1009:72 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace Aborted (core dumped)
Because of the above, upgrading the
1.0.0-beta.9 requires some extra steps. We've listed them down below and we advice to follow this migration guide both if you do or do not encounter this issue!
PS. if you use docker, there is a guide by the community that describes a rough example on how to approach this upgrade. You can find it here!
1. Download the special
We did a special
1.0.0-beta.8 release that ensures that all
" characters are escaped when exporting.
- Download the appropiate binary for your system from the github release.
- In the case of linux and macos, extract the binary from the
To use this binary instead of the installed version of surrealdb, enter the direct path to it.
2. Start the instance with the temporary
You can start the instance with the same arguments as you normally would, only replace the path to the binary.
user@localhost % /path/to/binary/surreal start -u root -p root myolddataset.db
3. Export your data
Please follow the export docs to run the export. Make sure to use the temporarily downloaded binary here.
user@localhost % /path/to/binary/surreal export --conn http://localhost:8000 --ns ns --db db --user root --pass root mydata.surql
4. Stop the instance
1.0.0-beta.8 database server, before continuing on to the next step.
1.0.0-beta.9 database server, using the official docs before continuing on to the next step.
6. Start the
Start the new
1.0.0-beta.9 database server, before importing your data.
user@localhost % surreal start -u root -p root mynewdataset.db
7. Import your data
Please follow the import docs to run the import. Make sure to install
1.0.0-beta.9 on your systems first.
user@localhost % surreal import --conn http://localhost:8000 --ns ns --db db --user root --pass root mydata.surql
8. Check for changes in the release notes
There have been major improvements to the SurrealQL language, and also some potential breaking changes for how you have previously defined your schemas. Check out the changes on the release page for