mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-04 07:20:27 +00:00
chore: refactor db
This commit is contained in:
parent
d8f3b60625
commit
01b6bf5bb7
19 changed files with 193 additions and 156 deletions
|
|
@ -21,11 +21,9 @@ INSERT INTO messages (
|
|||
session_id,
|
||||
role,
|
||||
parts,
|
||||
model,
|
||||
created_at,
|
||||
updated_at
|
||||
model
|
||||
) VALUES (
|
||||
?, ?, ?, ?, ?, strftime('%s', 'now'), strftime('%s', 'now')
|
||||
?, ?, ?, ?, ?
|
||||
)
|
||||
RETURNING *;
|
||||
|
||||
|
|
@ -34,7 +32,7 @@ UPDATE messages
|
|||
SET
|
||||
parts = ?,
|
||||
finished_at = ?,
|
||||
updated_at = strftime('%s', 'now')
|
||||
updated_at = strftime('%Y-%m-%dT%H:%M:%f000Z', 'now')
|
||||
WHERE id = ?;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue