Files
digital-psychology/apps/api/migrations/000058_wechat_auth_gateway.up.sql
T
jackyu66gitandCursor 7155b8b53a feat(api): 接入微信登录并原生实现咨询域(ECR-049/050)
小程序可在 Go 上完成微信手机号登录、测评、预约和下单,不再反代 Java。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 00:26:29 +08:00

11 lines
499 B
SQL

-- ECR-049: WeChat identity + Java consult token on session
ALTER TABLE users ADD COLUMN IF NOT EXISTS wx_openid varchar(64) NULL;
ALTER TABLE users ADD COLUMN IF NOT EXISTS wx_unionid varchar(64) NULL;
ALTER TABLE users ADD COLUMN IF NOT EXISTS java_platform_user_id bigint NULL;
CREATE UNIQUE INDEX IF NOT EXISTS idx_users_wx_openid_unique
ON users(wx_openid) WHERE wx_openid IS NOT NULL AND deleted_at IS NULL;
ALTER TABLE user_sessions ADD COLUMN IF NOT EXISTS java_access_token text NULL;