Files
open-ticket/src/core/startup/migration.ts
T
DJj123dj 6d5bdc5dd4 #143 : Panels now edit after using dropdown
From now on, all panels will update/edit themselfs after a dropdown has been used. This will reset the dropdown selection in the user client which results in a smoother user experience.
2025-03-29 13:16:27 +01:00

17 lines
773 B
TypeScript

import {opendiscord, api, utilities} from "../../index"
export const migrations = [
//MIGRATE TO v4.0.0
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.0"),async () => {},async () => {}),
//MIGRATE TO v4.0.1
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.1"),async () => {},async () => {
//AFTER INIT MIGRATION
//add opendiscord:panel-message properties for all existing panels.
const globalDatabase = opendiscord.databases.get("opendiscord:global")
for (const panel of (await globalDatabase.getCategory("opendiscord:panel-update") ?? [])){
globalDatabase.set("opendiscord:panel-message",panel.key,panel.value)
}
})
]