mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-07 17:31:54 +00:00
core: enable prod channel to use shared production database
Ensures users on the prod channel have their data persisted to the same database as latest and beta channels, preventing data fragmentation across different release channels.
This commit is contained in:
parent
eac50f9151
commit
04074d3f4a
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ const log = Log.create({ service: "db" })
|
|||
|
||||
export namespace Database {
|
||||
export function getChannelPath() {
|
||||
if (["latest", "beta"].includes(CHANNEL) || Flag.OPENCODE_DISABLE_CHANNEL_DB)
|
||||
if (["latest", "beta", "prod"].includes(CHANNEL) || Flag.OPENCODE_DISABLE_CHANNEL_DB)
|
||||
return path.join(Global.Path.data, "opencode.db")
|
||||
const safe = CHANNEL.replace(/[^a-zA-Z0-9._-]/g, "-")
|
||||
return path.join(Global.Path.data, `opencode-${safe}.db`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue