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β
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
deleteOld | boolean | β | false | Delete 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β
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
dbType | string | β | The type of database to migrate from. | |
connection | Database MongoClient | β | The connection to the database. |