Skip to main content

migrate

This class provides methods to migrate from various of options, from other packages to database conversion.

Methods​

migrate.discord_xp()​

Migrates from discord-xp to simply-xp.

Parameters​

ParameterTypeRequiredDefaultDescription
deleteOldboolean❌falseDelete old data after migration

Returns​

  • boolean - If the migration was successful.

Throws​

  • XpFatal - If the migration was unsuccessful.

migrate.fromDB()​

Migrates from MongoDB to SQLite, or vice versa.

Parameters​

ParameterTypeRequiredDefaultDescription
dbTypestringβœ…The type of database to migrate from.
connectionDatabase MongoClientβœ…The connection to the database.