Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
5702f70c
Commit
5702f70c
authored
Jul 03, 2023
by
王亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update sql
parent
036bce76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
update-20230630.sql
doc/sql/update-20230630.sql
+61
-0
No files found.
doc/sql/update-202306
21
.sql
→
doc/sql/update-202306
30
.sql
View file @
5702f70c
---用户表
ALTER
TABLE
`xyqb_user`
.
`user`
ADD
COLUMN
`password_type`
TINYINT
(
3
)
NULL
DEFAULT
0
COMMENT
'0:是用户中心之前的加密方式,1:是消费地图迁移的数据加密方式'
AFTER
`bcrypt_password`
,
ADD
COLUMN
`tenant_id`
INT
NULL
COMMENT
'租户id'
AFTER
`password_type`
;
----新增用户资料表
----新增用户资料表
CREATE
TABLE
`xyqb_user`
.
`user_info`
(
CREATE
TABLE
`xyqb_user`
.
`user_info`
(
`id`
BIGINT
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`id`
BIGINT
(
20
)
NOT
NULL
AUTO_INCREMENT
,
...
@@ -16,11 +22,40 @@ CREATE TABLE `xyqb_user`.`user_info` (
...
@@ -16,11 +22,40 @@ CREATE TABLE `xyqb_user`.`user_info` (
`created_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`created_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
`updated_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
INDEX
`i
dx_user_id`
(
`user_id`
ASC
),
UNIQUE
`u
dx_user_id`
(
`user_id`
ASC
),
INDEX
`idx_user_phone`
(
`phone_no`
ASC
)
INDEX
`idx_user_phone`
(
`phone_no`
ASC
)
);
);
---微信用户登录表
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
`registered_from`
BIGINT
(
20
)
NULL
COMMENT
'来源(之前字段)'
AFTER
`tenant_id`
,
ADD
COLUMN
`app_id`
VARCHAR
(
32
)
NULL
COMMENT
'微信应用id'
AFTER
`registered_from`
;
---微信配置表
CREATE
TABLE
`xyqb_user`
.
`wechat_config`
(
`id`
BIGINT
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`app_id`
VARCHAR
(
32
)
NOT
NULL
COMMENT
'微信app_id
\n
'
,
`secret`
VARCHAR
(
64
)
NOT
NULL
COMMENT
'微信appsecret'
,
`state`
TINYINT
(
3
)
NOT
NULL
COMMENT
'状态'
,
`tenant_id`
INT
NOT
NULL
COMMENT
'租户id'
,
`created_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
));
--用户标记表(用来标记同一租户下用户归属)
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
'来源(之前字段)'
,
`created_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
TIMESTAMP
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
));
ALTER
TABLE
`xyqb_user`
.
`user`
ADD
COLUMN
`tenant_id`
INT
NULL
COMMENT
'租户id'
AFTER
`cipher_password`
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment