This commit is contained in:
dzc committed 2026-07-30 11:42:04 +08:00
1 parent befc75593d
commit c0fa58d2bc
19 files changed
+219 -2

No files matched your search

+3 -1
View File
@@ -300,6 +300,7 @@ COMMIT;
DROP TABLE IF EXISTS `member_user`;
CREATE TABLE `member_user` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_code` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户 Code,大小写敏感',
`mobile` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
`password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '密码',
`status` tinyint NOT NULL COMMENT '状态',
@@ -325,7 +326,8 @@ CREATE TABLE `member_user` (
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `uk_user_code` (`user_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 286 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员用户';
-- ----------------------------
@@ -0,0 +1,6 @@
-- 先执行本脚本增加字段和大小写敏感的唯一索引。
-- 再调用 PUT /admin-api/member/user/fill-missing-user-codes,为所有租户的历史用户补齐 Code。
ALTER TABLE `member_user`
ADD COLUMN `user_code` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL
COMMENT '用户 Code,大小写敏感' AFTER `id`,
ADD UNIQUE KEY `uk_user_code` (`user_code`) USING BTREE;