overleaf/services/web/migrations/20240618125145_cleanup_user_features_templates.js

13 lines
327 B
JavaScript
Raw Normal View History

const { batchedUpdate } = require('../scripts/helpers/batchedUpdate')
exports.tags = ['server-ce', 'server-pro', 'saas']
exports.migrate = async () => {
await batchedUpdate(
'users',
{ 'features.templates': { $exists: true } },
{ $unset: { 'features.templates': true } }
)
}
exports.rollback = async () => {}