CREATE TABLE IF NOT EXISTS biz_shop_manage_group (
    id BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '主键',
    group_name VARCHAR(128) NOT NULL COMMENT '分组名称',
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    UNIQUE KEY uk_group_name (group_name),
    KEY idx_created_at (created_at)
) COMMENT='店铺管理分组表';

ALTER TABLE biz_shop_manage
    ADD COLUMN IF NOT EXISTS group_id BIGINT NULL COMMENT '分组ID' AFTER id;

ALTER TABLE biz_shop_manage
    ADD KEY IF NOT EXISTS idx_group_id (group_id);
