USE zhibo;

-- 修改 follow_status 字段的默认值为'关注'
ALTER TABLE eb_follow_record 
MODIFY COLUMN follow_status varchar(20) NOT NULL DEFAULT '关注' COMMENT '关注状态：关注-已关注 0-已取消';

-- 验证修改
SHOW CREATE TABLE eb_follow_record;

-- 更新现有的错误记录
UPDATE eb_follow_record 
SET follow_status = '关注' 
WHERE follow_status = '0' AND is_deleted = 0;

-- 查看更新后的记录
SELECT id, follower_id, followed_id, follow_status, is_deleted, create_time 
FROM eb_follow_record 
ORDER BY create_time DESC 
LIMIT 10;
