fix(aihr): add semantic daily drill scoring fallback
This commit is contained in:
@@ -107,6 +107,7 @@ CREATE TABLE IF NOT EXISTS `aihr_practice_assignment` (
|
||||
`feedback` varchar(1000) DEFAULT NULL COMMENT '每日三题反馈',
|
||||
`correct` tinyint DEFAULT NULL COMMENT '是否答对',
|
||||
`score` int DEFAULT NULL COMMENT '每日三题得分',
|
||||
`score_mode` varchar(30) DEFAULT NULL COMMENT '评分模式 LLM/RULE_FALLBACK',
|
||||
`finished_time` datetime DEFAULT NULL COMMENT '完成时间',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
-- 每日三题评分模式留痕:幂等补列,不写入业务数据。
|
||||
SET @db_name = DATABASE();
|
||||
SET @table_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = @db_name
|
||||
AND table_name = 'aihr_practice_assignment'
|
||||
);
|
||||
SET @column_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = @db_name
|
||||
AND table_name = 'aihr_practice_assignment'
|
||||
AND column_name = 'score_mode'
|
||||
);
|
||||
SET @ddl = IF(
|
||||
@table_exists = 1 AND @column_exists = 0,
|
||||
'ALTER TABLE aihr_practice_assignment ADD COLUMN score_mode varchar(30) DEFAULT NULL COMMENT ''评分模式 LLM/RULE_FALLBACK'' AFTER score',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @ddl;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
Reference in New Issue
Block a user