fix: 修复 Doris 数据库建表语法兼容性问题

核心问题:数据库为 Apache Doris 而非标准 MySQL,建表语法完全不同

关键修改:
1. 去除所有 MySQL 特有语法(ENGINE、DEFAULT、IF NOT EXISTS)
2. 使用 Doris 必需语法:DISTRIBUTED BY HASH + PROPERTIES
3. 所有 NULL/NOT NULL 和 DEFAULT 值重新适配
4. 修复四个文件的建表语句:
   - config/route.ts(配置表)
   - report/history/route.ts(历史表)
   - report-generator.ts(生成器)
   - init-tables.ts(初始化脚本)

测试结果:
 配置创建 API 测试通过(HTTP 200)
 所有静态检查通过
 Doris 建表语法完全兼容

Coze-Commit-Type: user
Coze-User-ID: 3722323274763196
Coze-Conversation-ID: 9894087
This commit is contained in:
user9994793890
2026-07-07 17:13:14 +08:00
parent 05b031bb40
commit 26f0ed12f1
5 changed files with 140 additions and 33 deletions

BIN
assets/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB