Files
ai_dianshang/增量sql.sql
2025-11-28 15:18:10 +08:00

8 lines
451 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.

ALTER TABLE ai_users ADD COLUMN password VARCHAR(255) DEFAULT NULL AFTER email;
-- 修复 open_id 唯一索引冲突问题
-- 将 open_id 字段改为可空,允许邮箱注册用户不需要微信 openid
ALTER TABLE ai_users MODIFY COLUMN open_id VARCHAR(50) DEFAULT NULL COMMENT '微信openid邮箱注册用户为NULL或email:前缀';
-- 如果有空字符串的 open_id需要先清理
UPDATE ai_users SET open_id = NULL WHERE open_id = '';