fix(tenant): 收紧双站运营提号与录单边界

This commit is contained in:
yml
2026-11-16 16:12:55 +08:00
parent 1108df195d
commit 1ce9f7aaf5
60 changed files with 1531 additions and 337 deletions
@@ -0,0 +1,12 @@
-- +goose Up
-- 历史分销账号仍属于大锤租户,但渠道归属独立;同一手机号可以再注册大锤经营账号。
ALTER TABLE users
DROP KEY uk_users_tenant_phone,
ADD UNIQUE KEY uk_users_tenant_site_phone (tenant_id, distribution_site_id, phone);
-- +goose Down
ALTER TABLE users
DROP KEY uk_users_tenant_site_phone,
ADD UNIQUE KEY uk_users_tenant_phone (tenant_id, phone);