-- 添加专业大类字段到 user_profiles 表
-- 执行日期: 2025-12-08

ALTER TABLE `user_profiles`
ADD COLUMN `professional_category` VARCHAR(100) DEFAULT NULL COMMENT '专业大类名称' AFTER `major`,
ADD COLUMN `professional_category_code` VARCHAR(20) DEFAULT NULL COMMENT '专业大类代码' AFTER `professional_category`;

-- 验证字段添加成功
SELECT COLUMN_NAME, COLUMN_TYPE, COLUMN_COMMENT
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'ddcz_bitmap'
AND TABLE_NAME = 'user_profiles'
AND COLUMN_NAME IN ('professional_category', 'professional_category_code');
