--
ALTER TABLE s_user_core
    ADD UNIQUE INDEX inx_usr_login (user_name) USING BTREE ;

ALTER TABLE s_role_user
    ADD INDEX inx_ru_uid (user_id) USING BTREE ;

ALTER TABLE s_config
    ADD INDEX inx_sc_key (config_key) USING BTREE ;

-- 用户核心表添加字段 2023-03-06
ALTER TABLE s_user_core
    ADD COLUMN wx_open_id  varchar(64) NULL AFTER remark;
ALTER TABLE s_user_core
    ADD COLUMN wx_union_id  varchar(64) NULL AFTER wx_open_id;
ALTER TABLE s_user_core
    ADD COLUMN ding_user_id  varchar(64) NULL AFTER wx_union_id;
ALTER TABLE s_user_core
    ADD COLUMN bind_client_id  varchar(64) NULL AFTER ding_user_id;
ALTER TABLE s_user_core
    ADD COLUMN bind_wechat  int NOT NULL DEFAULT 0 COMMENT '是否绑定微信：1_是， 0_否。' AFTER bind_client_id;
ALTER TABLE s_user_core
    ADD COLUMN modify_pwd  int NOT NULL DEFAULT 0 COMMENT '是否修改密码：0_否，1_是' AFTER bind_wechat;
ALTER TABLE s_user_core
    ADD COLUMN bind_mobile  int NOT NULL DEFAULT 0 COMMENT '是否绑定手机：1_是， 0_否。' AFTER modify_pwd;
ALTER TABLE s_user_core
    ADD COLUMN bind_mail  int NOT NULL DEFAULT 0 COMMENT '是否绑定邮箱：1_是， 0_否。' AFTER bind_mobile;
ALTER TABLE s_user_core
    ADD COLUMN profile_id  bigint NOT NULL DEFAULT 0 COMMENT '关联的档案id，0表示未关联' AFTER bind_mail;

-- 数据字典
ALTER TABLE s_dict_data
    ADD COLUMN parent_id  bigint NOT NULL DEFAULT 0 COMMENT '父记录id' AFTER remark;

--
