overleaf/services/web/migrations/20240618125145_cleanup_user_features_templates.js
Liangjun Song b69ff9417a Merge pull request #20731 from overleaf/revert-20480-ls-convert-migration-scripts-to-esm
Revert "Convert migration scripts to ESM"

GitOrigin-RevId: ca9ddda6ddee8964f72797d3b653ef9cee6a7a49
2024-10-14 10:57:02 +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 () => {}