overleaf/services/web/migrations/20240531082910_remove_project_invite_tokens.js
ilkin-overleaf f9245b8c08 Merge pull request #19071 from overleaf/ii-invite-token-remove-token-field
[web] Remove the token field from `projectInvites` collection

GitOrigin-RevId: fe8395e1d1a0ba2daad600b7e3be657f40151a8e
2024-07-04 08:05:00 +00:00

15 lines
395 B
JavaScript

/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['server-ce', 'server-pro', 'saas']
exports.migrate = async client => {
const { db } = client
await Helpers.assertDependency(
'20240524135408_add_token_hmac_project_invite_tokens'
)
await db.projectInvites.updateMany({}, { $unset: { token: 1 } })
}
exports.rollback = async client => {}