Files
overleaf-cep/tools/migrations/20260225162503_add_index_domainVerifications.mjs
Jessica Lawshe e89c9128c3 Merge pull request #31783 from overleaf/jel-mongo-domainVerification
[web] Add `domainVerifications` collection

GitOrigin-RevId: 5a9fe9ea80ecf76af9802014149ae785cc4412d5
2026-03-06 09:17:33 +00:00

33 lines
540 B
JavaScript

/* eslint-disable no-unused-vars */
import Helpers from './lib/helpers.mjs'
const tags = ['saas']
const indexes = [
{
key: { domain: 1 },
name: 'domain_1',
unique: true,
},
]
const migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.domainVerifications, indexes)
}
const rollback = async client => {
const { db } = client
await Helpers.dropIndexesFromCollection(db.domainVerifications, [
{ name: 'domain_1' },
])
}
export default {
tags,
migrate,
rollback,
}