Commit 6f33ba2a authored by 王亮's avatar 王亮

update sql.

parent 7c8e6443
......@@ -2,7 +2,7 @@
---用户表
ALTER TABLE `xyqb_user`.`user`
ADD COLUMN `password_type` TINYINT(3) NULL DEFAULT 0 COMMENT '0:是用户中心之前的加密方式,1:是消费地图迁移的数据加密方式' AFTER `cipher_password`,
ADD COLUMN `tenant_id` INT NULL COMMENT '租户id' AFTER `password_type`;
ADD COLUMN `tenant_id` INT NOT NULL DEFAULT 560761 COMMENT '租户id' AFTER `password_type`;
----新增用户资料表
CREATE TABLE `xyqb_user`.`user_info` (
......@@ -30,7 +30,7 @@ CREATE TABLE `xyqb_user`.`user_info` (
---微信用户登录表,app_id可能需要跟app_name进行洗
ALTER TABLE `xyqb_user`.`wechat_userinfo`
ADD COLUMN `session_key` VARCHAR(255) NULL COMMENT '第三方sessionkey' AFTER `encrypted_phone_no`,
ADD COLUMN `tenant_id` INT NULL COMMENT '租户id' AFTER `session_key`,
ADD COLUMN `tenant_id` INT NOT NULL DEFAULT 560761 COMMENT '租户id' AFTER `session_key`,
ADD COLUMN `registered_from` BIGINT(20) NULL COMMENT '来源(之前字段)' AFTER `tenant_id`,
ADD COLUMN `app_id` VARCHAR(32) NULL COMMENT '微信应用id' AFTER `registered_from`;
......@@ -51,7 +51,7 @@ CREATE TABLE `xyqb_user`.`user_tag` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`user_id` BIGINT(20) NOT NULL COMMENT '用户表id',
`registered_from` BIGINT(20) NULL COMMENT '来源(之前字段)',
`tenant_id` INT NOT NULL COMMENT '租户id',
`tenant_id` INT NOT NULL DEFAULT 560761 COMMENT '租户id',
`created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
UNIQUE INDEX `udx_user_id` (`user_id` ASC, `registered_from` ASC, `tenant_id` ASC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment