Files
blackbird/db2/scripts/patch_002_notes_timestamps.sql
qing 01c699e7a6 feat: Notes 新增创建时间/更新时间列,dnfs2 添加/更新时填入本地时间
- patch_002 存量补丁:created_at / updated_at DATETIME 列
- dnfs2 add_note 同时填入两个时间戳,update_note 只更新 updated_at
- 时间格式 local_now():"YYYY-MM-DD HH:MM:S"(本地时间)
2026-08-11 10:34:09 +00:00

11 lines
524 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 补丁 002:Notes 表新增创建时间 / 更新时间列
-- 数据库类型: SQLite
-- 依赖: create_sqlite3.sql(Notes 表已存在)
-- 幂等性: ADD COLUMN 为一次性迁移,重复执行会报 "duplicate column name",
-- 请按迁移编号顺序执行一次。
-- 创建时间(新增节点时由 dnfs2 填入本地时间)
ALTER TABLE Notes ADD COLUMN created_at DATETIME;
-- 更新时间(新增/更新节点时由 dnfs2 填入本地时间)
ALTER TABLE Notes ADD COLUMN updated_at DATETIME;