| 123456789101112131415161718192021222324252627 |
- import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
- const tags = ['saas']
- const migrate = async client => {
- const { db } = client
- await batchedUpdate(
- db.subscriptions,
- { 'features.managedUsers': { $ne: true } },
- { $set: { 'features.managedUsers': null } }
- )
- }
- const rollback = async client => {
- const { db } = client
- await batchedUpdate(
- db.subscriptions,
- { 'features.managedUsers': { $eq: null } },
- { $set: { 'features.managedUsers': false } }
- )
- }
- export default {
- tags,
- migrate,
- rollback,
- }
|