Files
MBTI_wang/api/database/migrations/add_cold_face.sql

13 lines
832 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.

-- 冷脸分析字段:扩展 user_profile用于列表/详情展示
-- 说明:
-- coldFaceScore 0-100<35=暖(warm), 35-65=中(neutral), >65=冷(cold)
-- coldFaceLevel 字符串枚举 cold/neutral/warm
-- coldFaceUpdatedAt 最近一次测评更新时间戳(秒)
-- 执行: 在 phpMyAdmin 或 CLI 运行
ALTER TABLE `mbti_user_profile`
ADD COLUMN `coldFaceScore` tinyint(3) UNSIGNED NULL DEFAULT NULL COMMENT '冷脸分(0-100)' AFTER `lastFaceResultId`,
ADD COLUMN `coldFaceLevel` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '冷脸等级: cold/neutral/warm' AFTER `coldFaceScore`,
ADD COLUMN `coldFaceUpdatedAt` int(11) NULL DEFAULT NULL COMMENT '冷脸更新时间(时间戳)' AFTER `coldFaceLevel`,
ADD INDEX `idx_coldFaceLevel` (`coldFaceLevel`) USING BTREE;