refactor(db): 阶段C - Postgres migration 补全

- migrations/postgres/ 8 个文件改为 Postgres 方言:
  BIGSERIAL、原生 BOOLEAN、TEXT 主键、ON CONFLICT DO NOTHING/UPDATE、
  "key" 双引号处理保留字
- 跳过 SQLite 历史遗留列(与 MySQL 版一致)
- 00005 ws_messages 空操作(00001 已建)

至此三套数据库 migration 全部就位,业务 SQL 通过方言适配器统一处理。
SQLite 全测试通过,MySQL/PG 待真实实例验证。

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
ChristandClaude Opus 4.8 committed 2026-07-06 13:02:30 +08:00
1 parent 36a7f74154
commit fb83aacb8b
8 files changed
+106 -199

No files matched your search

@@ -3,8 +3,7 @@
ALTER TABLE cookies ADD COLUMN nickname TEXT DEFAULT '';
ALTER TABLE cookies ADD COLUMN avatar_url TEXT DEFAULT '';
ALTER TABLE cookies ADD COLUMN updated_at TIMESTAMP;
UPDATE cookies
SET updated_at = COALESCE(updated_at, created_at, CURRENT_TIMESTAMP);
UPDATE cookies SET updated_at = COALESCE(updated_at, created_at, CURRENT_TIMESTAMP);
-- +goose StatementEnd
-- +goose Down