Made database migration compatible with plugins

This commit is contained in:
DJj123dj
2025-02-17 19:44:18 +01:00
parent 58674452d8
commit b12556120c
4 changed files with 48 additions and 5 deletions
+5 -2
View File
@@ -76,8 +76,8 @@ const main = async () => {
}
})
//handle data migration
await (await import("./core/startup/manageMigration.js")).loadVersionMigrationSystem()
//handle data migration (PART 1)
const lastVersion = await (await import("./core/startup/manageMigration.js")).loadVersionMigrationSystem()
//load plugins
if (opendiscord.defaults.getDefault("pluginLoading")){
@@ -222,6 +222,9 @@ const main = async () => {
await opendiscord.events.get("afterLanguagesSelected").emit([opendiscord.languages.get(languageId),opendiscord.languages.get(backupLanguageId),opendiscord.languages])
}
//handle data migration (PART 2)
if (lastVersion) await (await import("./core/startup/manageMigration.js")).loadAllAfterInitVersionMigrations(lastVersion)
//load config checker
opendiscord.log("Loading config checker...","system")