2.0.0-beta
The 2.0.0-beta
release of SurrealDB includes many new features, improvements, and bug fixes. However, because of changes in the underlying way that SurrealDB stores data, three steps are required to migrate to 2.0.0-beta
. We’ve listed them below, and we advise following this migration guide whether or not you encounter this issue!
If you are experiencing this issue, an error similar to the following will be thrown when connecting to the database or when selecting specific data.
error: Storage version is out-of-date.
A new surreal fix
command has been implemented to automatically change the format of your stored data. The command is followed by a path to the data. Two examples:
surreal fix surrealkv://mydata
surreal fix rocksdb:somedatabase
The surreal fix
command above has been created specifically for 1.x instances. However, data currently on a 2.0.0-alpha
instance can still be manually exported and then reimported into a project running on 2.0.0-beta
via the following steps.
surreal export
command in the terminal:# Example export command to export data to a file called `export.surql` in the downloads directory.
surreal export --conn http://localhost:8000 --user root --pass root --ns test --db test downloads/export.surql
This will create a file called export.surql
in the current directory.
You can now import this file back into your project running on 2.0.0-beta
.
surreal import --conn http://localhost:8000 --user root --pass root --ns test --db test downloads/export.surql
There have been major improvements to SurrealDB in 2.0.0
release both in alpha and beta. Check out the changes on the release page.