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:
1 parent
36a7f74154
commit
fb83aacb8b
8 files changed
+106
-199
No files matched your search
@@ -1,8 +1,9 @@
|
||||
-- +goose Up
|
||||
INSERT OR IGNORE INTO system_settings (key, value, description) VALUES
|
||||
INSERT INTO system_settings ("key", value, description) VALUES
|
||||
('ai_api_url', 'https://dashscope.aliyuncs.com/compatible-mode/v1', 'AI OpenAI兼容API地址'),
|
||||
('ai_api_key', '', 'AI API Key'),
|
||||
('ai_model', 'qwen-plus', 'AI模型名称');
|
||||
('ai_model', 'qwen-plus', 'AI模型名称')
|
||||
ON CONFLICT ("key") DO NOTHING;
|
||||
|
||||
-- +goose Down
|
||||
DELETE FROM system_settings WHERE key IN ('ai_api_url', 'ai_api_key', 'ai_model');
|
||||
DELETE FROM system_settings WHERE "key" IN ('ai_api_url', 'ai_api_key', 'ai_model');
|
||||
Reference in new issue
Block a user