mirror of
https://github.com/sst/opencode.git
synced 2025-09-14 00:36:34 +00:00
chore: refactor db
This commit is contained in:
parent
d8f3b60625
commit
01b6bf5bb7
19 changed files with 193 additions and 156 deletions
|
@ -28,11 +28,9 @@ INSERT INTO files (
|
|||
session_id,
|
||||
path,
|
||||
content,
|
||||
version,
|
||||
created_at,
|
||||
updated_at
|
||||
version
|
||||
) VALUES (
|
||||
?, ?, ?, ?, ?, strftime('%s', 'now'), strftime('%s', 'now')
|
||||
?, ?, ?, ?, ?
|
||||
)
|
||||
RETURNING *;
|
||||
|
||||
|
@ -41,7 +39,7 @@ UPDATE files
|
|||
SET
|
||||
content = ?,
|
||||
version = ?,
|
||||
updated_at = strftime('%s', 'now')
|
||||
updated_at = strftime('%Y-%m-%dT%H:%M:%f000Z', 'now')
|
||||
WHERE id = ?
|
||||
RETURNING *;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue