mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #13082 from overleaf/msm-migration-check-history
[web/migrations] Check Full History Migration in CE/SP GitOrigin-RevId: 567e7146511710ef4d79c201f5c31863d5be664e
This commit is contained in:
parent
19c625d945
commit
234eb31ffb
1 changed files with 17 additions and 0 deletions
|
@ -0,0 +1,17 @@
|
|||
exports.tags = ['server-ce', 'server-pro']
|
||||
|
||||
exports.migrate = async client => {
|
||||
const { db } = client
|
||||
const count = await db.projects.countDocuments({
|
||||
'overleaf.history.display': { $ne: true },
|
||||
})
|
||||
if (count > 0) {
|
||||
throw new Error(
|
||||
`Found ${count} projects not migrated to Full Project History`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
exports.rollback = async client => {
|
||||
// Not applicable
|
||||
}
|
Loading…
Reference in a new issue