overleaf/services/web/migrations/20240618125145_cleanup_user_features_templates.js
Miguel Serrano 1697087425 Merge pull request #18970 from overleaf/msm-clean-features-templates
[web] Cleanup `features.templates`

GitOrigin-RevId: 7c9f7bc827700e4255a5ba8a46de70318afdaae4
2024-06-24 12:05:43 +00:00

12 lines
327 B
JavaScript

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 () => {}