mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-01 22:33:30 +08:00
11 lines
394 B
SQL
11 lines
394 B
SQL
-- 添加prompt字段(如果不存在)
|
||
ALTER TABLE tasks ADD COLUMN IF NOT EXISTS prompt text;
|
||
|
||
-- 修改cursor_position为JSON类型(如果还是bigint类型)
|
||
ALTER TABLE tasks ALTER COLUMN cursor_position TYPE jsonb USING
|
||
CASE
|
||
WHEN cursor_position IS NOT NULL THEN
|
||
jsonb_build_object('position', cursor_position, 'line', 1, 'column', cursor_position)
|
||
ELSE NULL
|
||
END;
|