overleaf/services/web/migrations/20241002180623_drop_unused_collections.mjs
Liangjun Song 7258ddcf02 Merge pull request #20770 from overleaf/ls-drop-unused-collections
drop unused collections

GitOrigin-RevId: 4b079f15dca349ef6a5aed8d9dcb35478819c2ce
2024-10-14 11:03:59 +00:00

31 lines
505 B
JavaScript

import Helpers from './lib/helpers.mjs'
const tags = ['saas']
const unusedCollections = [
'githubBuilds',
'githubRepos',
'userstubs',
'templates',
'quotes',
'folders',
'files',
'objectlabs-system',
'objectlabs-system.admin.collections',
]
const migrate = async client => {
for (const name of unusedCollections) {
await Helpers.dropCollection(name)
}
}
const rollback = async client => {
// can't really do anything here
}
export default {
tags,
migrate,
rollback,
}