-- ftb_store 新增门店类型、加盟商字段
ALTER TABLE `ftb_store`
    ADD COLUMN `F_StoreType` varchar(50) NULL DEFAULT 'DIRECT_SALE' COMMENT '门店类型' AFTER `F_StoreName`;

ALTER TABLE `ftb_store`
    ADD COLUMN `F_FranchiseeId` varchar(50) NULL DEFAULT NULL COMMENT '加盟商' AFTER `F_StoreType`;
    CREATE INDEX ftb_store_F_FranchiseeId_IDX USING BTREE ON ftb_store (F_FranchiseeId);

CREATE INDEX ftb_personnels_staff_employment_apply_F_UserId_OrgId_IDX USING BTREE ON ftb_personnels_staff_employment_apply (F_UserId,F_CurrOrg);

CREATE INDEX idx_fpsea_org_enabled_user
  ON ftb_personnels_staff_employment_apply (F_CurrOrg, F_UserId);