Skip to content

Commit 0ccef1b

Browse files
committed
sync
1 parent 7706f5b commit 0ccef1b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/opencode/src/cli/cmd/import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const ImportCommand = cmd({
9191
.values({
9292
id: msg.info.id,
9393
session_id: exportData.info.id,
94-
created_at: msg.info.time?.created ?? Date.now(),
94+
time_created: msg.info.time?.created ?? Date.now(),
9595
data: msg.info,
9696
})
9797
.onConflictDoNothing()

packages/opencode/src/storage/db.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ export namespace Database {
139139
}
140140

141141
export const Timestamps = {
142-
time_created: integer().notNull(),
142+
time_created: integer()
143+
.notNull()
144+
.$default(() => Date.now()),
143145
time_updated: integer()
144146
.notNull()
145147
.$onUpdate(() => Date.now()),

0 commit comments

Comments
 (0)