Skip to content

Commit

Permalink
Update migrations for utility config
Browse files Browse the repository at this point in the history
  • Loading branch information
NoComment1105 committed Aug 28, 2024
1 parent cab1292 commit 3081b45
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.hyacinthbots.lilybot.database.migrations.config

import org.hyacinthbots.lilybot.database.entities.ModerationConfigData
import org.hyacinthbots.lilybot.database.entities.UtilityConfigData
import org.litote.kmongo.coroutine.CoroutineDatabase
import org.litote.kmongo.exists
import org.litote.kmongo.setValue
Expand All @@ -12,4 +13,22 @@ suspend fun configV7(db: CoroutineDatabase) {
setValue(ModerationConfigData::autoInviteModeratorRole, null)
)
}
with(db.getCollection<UtilityConfigData>("utilityConfigData")) {
updateMany(
UtilityConfigData::logChannelUpdates exists false,
setValue(UtilityConfigData::logChannelUpdates, false)
)
updateMany(
UtilityConfigData::logEventUpdates exists false,
setValue(UtilityConfigData::logEventUpdates, false)
)
updateMany(
UtilityConfigData::logInviteUpdates exists false,
setValue(UtilityConfigData::logInviteUpdates, false)
)
updateMany(
UtilityConfigData::logRoleUpdates exists false,
setValue(UtilityConfigData::logRoleUpdates, false)
)
}
}

0 comments on commit 3081b45

Please sign in to comment.