mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Merge pull request #31783 from overleaf/jel-mongo-domainVerification
[web] Add `domainVerifications` collection GitOrigin-RevId: 5a9fe9ea80ecf76af9802014149ae785cc4412d5
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
/* 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,
|
||||
}
|
||||
@@ -20,6 +20,7 @@ export const db = {
|
||||
dropboxProjects: internalDb.collection('dropboxProjects'),
|
||||
docSnapshots: internalDb.collection('docSnapshots'),
|
||||
docs: internalDb.collection('docs'),
|
||||
domainVerifications: internalDb.collection('domainVerifications'),
|
||||
feedbacks: internalDb.collection('feedbacks'),
|
||||
githubSyncEntityVersions: internalDb.collection('githubSyncEntityVersions'),
|
||||
githubSyncProjectStates: internalDb.collection('githubSyncProjectStates'),
|
||||
|
||||
Reference in New Issue
Block a user