Files
Mycontent/soul-api/scripts/add-persons-user-id.sql

11 lines
478 B
SQL
Raw 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.

-- persons 表新增 user_id用于“超级个体开通后自动创建@人”等幂等绑定
-- 说明:
-- - 允许为空(历史数据/手工创建不绑定 user
-- - 允许多条 NULLMySQL UNIQUE 对 NULL 不冲突)
-- - 绑定后建议一人仅一条 Person满足“昵称同名@人”需求)
ALTER TABLE persons
ADD COLUMN user_id VARCHAR(50) DEFAULT NULL COMMENT '绑定用户ID幂等创建@人)',
ADD UNIQUE KEY uk_persons_user_id (user_id);