Merge pull request #11550 from overleaf/msm-migrate-history-count-fix

[web/scripts] fix error count in `migrate_history.js`

GitOrigin-RevId: d7326c4e25913969f196276c913e70a03398f3ac
This commit is contained in:
Miguel Serrano 2023-01-31 11:30:21 +01:00 committed by Copybot
parent d9b851fb9e
commit cefdc78c6e

View file

@ -88,8 +88,13 @@ async function migrateProjects(projectsToMigrate) {
console.log(`Migrating project: ${project._id}`)
try {
const result = await upgradeProject(project._id)
console.log('migration result', result)
projectsMigrated++
if (result.error) {
console.error('migration failed', result)
projectsFailed++
} else {
console.log('migration result', result)
projectsMigrated++
}
} catch (err) {
projectsFailed++
console.error(err)