Merge pull request #19151 from overleaf/em-history-ranges-quick-migration

Add quick history ranges support migration

GitOrigin-RevId: 8446beb6bcd7384c32fc1b216e4b72d8f5d91500
This commit is contained in:
Eric Mc Sween
2024-07-03 08:04:44 +00:00
committed by Copybot
parent e8e31dbdb5
commit a95c0bbfc3
7 changed files with 202 additions and 4 deletions
@@ -13,6 +13,7 @@ async function main() {
direction,
force,
stopOnError,
quickOnly,
} = parseArgs()
await HistoryRangesSupportMigration.promises.migrateProjects({
projectIds,
@@ -23,6 +24,7 @@ async function main() {
direction,
force,
stopOnError,
quickOnly,
})
}
@@ -41,12 +43,13 @@ Options:
--backwards Disable history ranges support for selected project ids
--force Migrate projects even if they were already migrated
--stop-on-error Stop after first migration error
--quick-only Do not try a resync migration if quick migration fails
`)
}
function parseArgs() {
const args = minimist(process.argv.slice(2), {
boolean: ['backwards', 'help', 'all', 'force'],
boolean: ['backwards', 'help', 'all', 'force', 'quick-only'],
string: ['owner-id', 'project-id', 'min-id', 'max-id'],
})
@@ -63,6 +66,7 @@ function parseArgs() {
const maxCount = args['max-count']
const force = args.force
const stopOnError = args['stop-on-error']
const quickOnly = args['quick-only']
const all = args.all
if (
@@ -89,6 +93,7 @@ function parseArgs() {
direction,
force,
stopOnError,
quickOnly,
}
}