-- =====================================================
-- 会员营销模块 - 增量脚本（店员角色）
-- 模块：business-marketing
-- 创建时间：2026-06-25
-- 说明：为 app_member_tenant 增加 member_role；已建表环境执行本脚本
-- =====================================================

ALTER TABLE `app_member_tenant`
  ADD COLUMN `member_role` VARCHAR(32) NOT NULL DEFAULT 'CUSTOMER'
    COMMENT '店铺内角色：CUSTOMER-顾客 CLERK-店员 MANAGER-店长' AFTER `channel_code`;

ALTER TABLE `app_member_tenant`
  ADD KEY `idx_member_role` (`member_role`);
