Currently, Mercury Core uses SurrealDB 1.5.4 as the database, alongside a beta version of the surrealdb.js connection library. SurrealDB 2 includes a number of fixes that will improve queries across the site and provide a better foundation for future features.
Describe the proposed solution
Upgrade SurrealDB to version 2, and surrealdb.js to version 1 (new package name surrealdb). Migration of data to the new version should be handled manually with the surreal fix command. Queries should also be updated to remove deprecated API usage and to take advantage of new features.
Highly recommended to backup/export data before migrating with surreal fix to prevent data loss, though keep in mind exported data will have queries like UPDATE which have a different meaning in SurrealDB 1 vs 2
Describe the problem
Currently, Mercury Core uses SurrealDB 1.5.4 as the database, alongside a beta version of the surrealdb.js connection library. SurrealDB 2 includes a number of fixes that will improve queries across the site and provide a better foundation for future features.
Describe the proposed solution
Upgrade SurrealDB to version 2, and surrealdb.js to version 1 (new package name surrealdb). Migration of data to the new version should be handled manually with the
surreal fix
command. Queries should also be updated to remove deprecated API usage and to take advantage of new features.