20250121114712_add_chat_policy_to_group_policy.mjs 355 B

1234567891011121314151617
  1. const tags = ['saas']
  2. const migrate = async client => {
  3. const { db } = client
  4. await db.grouppolicies.updateMany({}, { $set: { userCannotUseChat: false } })
  5. }
  6. const rollback = async client => {
  7. const { db } = client
  8. await db.grouppolicies.updateMany({}, { $unset: { userCannotUseChat: '' } })
  9. }
  10. export default {
  11. tags,
  12. migrate,
  13. rollback,
  14. }