We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1bfecb commit 7bfbb1fCopy full SHA for 7bfbb1f
1 file changed
packages/opencode/src/cli/cmd/import.ts
@@ -131,7 +131,14 @@ export const ImportCommand = cmd({
131
return
132
}
133
134
- Database.use((db) => db.insert(SessionTable).values(Session.toRow(exportData.info)).onConflictDoNothing().run())
+ const row = { ...Session.toRow(exportData.info), project_id: Instance.project.id }
135
+ Database.use((db) =>
136
+ db
137
+ .insert(SessionTable)
138
+ .values(row)
139
+ .onConflictDoUpdate({ target: SessionTable.id, set: { project_id: row.project_id } })
140
+ .run(),
141
+ )
142
143
for (const msg of exportData.messages) {
144
Database.use((db) =>
0 commit comments