fix(core): persist JSON-to-SQLite migration completion marker
parent
5ec5d1dace
commit
f47641df58
|
|
@ -88,7 +88,7 @@ let cli = yargs(hideBin(process.argv))
|
|||
args: process.argv.slice(2),
|
||||
})
|
||||
|
||||
const marker = path.join(Global.Path.data, "opencode.db")
|
||||
const marker = path.join(Global.Path.data, "storage", "json-sqlite-migration.done")
|
||||
if (!(await Filesystem.exists(marker))) {
|
||||
const tty = process.stderr.isTTY
|
||||
process.stderr.write("Performing one time database migration, may take a few minutes..." + EOL)
|
||||
|
|
@ -122,6 +122,7 @@ let cli = yargs(hideBin(process.argv))
|
|||
process.stderr.write(`sqlite-migration:done${EOL}`)
|
||||
}
|
||||
}
|
||||
await Filesystem.write(marker, `${Date.now()}\n`)
|
||||
process.stderr.write("Database migration complete." + EOL)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue