-- 为 growth_record 表添加 manager_supplement 字段
-- 用于存储管理师的补充反馈内容

-- 检查字段是否已存在
SELECT 
    COLUMN_NAME,
    DATA_TYPE,
    CHARACTER_MAXIMUM_LENGTH,
    IS_NULLABLE,
    COLUMN_COMMENT
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'peidu'
  AND TABLE_NAME = 'growth_record'
  AND COLUMN_NAME = 'manager_supplement';

-- 添加字段（如果字段不存在）
ALTER TABLE growth_record
ADD COLUMN manager_supplement TEXT COMMENT '管理师补充反馈' AFTER supplement;

-- 验证字段是否添加成功
SELECT 
    COLUMN_NAME,
    DATA_TYPE,
    CHARACTER_MAXIMUM_LENGTH,
    IS_NULLABLE,
    COLUMN_COMMENT
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'peidu'
  AND TABLE_NAME = 'growth_record'
ORDER BY ORDINAL_POSITION;
