tp-link-extender / MercuryCore

Self-hostable MMO game creation platform: build-your-own-Roblox
https://mercury2.com
The Unlicense
22 stars 8 forks source link

Migrate to SurrealDB 2 #355

Closed Heliodex closed 2 days ago

Heliodex commented 1 month ago

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.

Heliodex commented 1 month ago

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