Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dankal-data-view
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
仲光辉
dankal-data-view
Commits
52504e3d
Commit
52504e3d
authored
Jan 21, 2025
by
mercymodest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:- add sql
parent
c0147eed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
google-sync-optimize.sql
电子日历/google-sync-optimize.sql
+32
-32
No files found.
电子日历/google-sync-optimize.sql
View file @
52504e3d
alter
table
t_third_party_calendar_list
#
alter
table
t_third_party_calendar_list
alter
table
t_third_party_calendar_list
add
calendar_subscribe_status
tinyint
null
comment
'日历监听状态: 0:监听中 1:监听成功 2:监听失败'
after
google_access_role
;
-- t_third_party_calendar_list 订阅日志表
CREATE
TABLE
`t_third_party_calendar_subscribe_log`
(
`id`
BIGINT
NOT
NULL
COMMENT
'主键'
,
-- third_party_calendar_auth_id
`third_party_calendar_auth_id`
BIGINT
NOT
NULL
COMMENT
't_third_party_calendar_auth#third_party_calendar_auth_id'
,
-- third_party_calendar_list_id
`third_party_calendar_list_id`
BIGINT
NOT
NULL
COMMENT
't_third_party_calendar_list#third_party_calendar_list_id'
,
-- email
`email`
VARCHAR
(
255
)
NOT
NULL
COMMENT
'邮箱'
,
-- subscribe_status tinyint null comment '订阅状态,0:表示订阅失败,1:表示订阅成功',
`subscribe_status`
TINYINT
NOT
NULL
COMMENT
'订阅状态,0:表示订阅失败,1:表示订阅成功'
,
-- 错误栈信息
`error_stack`
TEXT
NULL
COMMENT
'错误栈信息'
,
-- device_id BIGINT NOT NULL COMMENT '设备ID',
`device_id`
BIGINT
NOT
NULL
COMMENT
'设备ID'
,
-- source_type tinyint null comment '第三方日历类型,0:表示Google,1:表示Outlook',
`source_type`
TINYINT
NOT
NULL
COMMENT
'第三方日历类型,0:表示Google,1:表示Outlook'
,
-- 创建时间插入时自动更新
`create_time`
DATETIME
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`update_time`
DATETIME
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'第三方日历订阅日志表'
;
CREATE
INDEX
`idx_third_party_calendar_auth_id`
ON
`t_third_party_calendar_subscribe_log`
(
`third_party_calendar_auth_id`
);
CREATE
INDEX
`idx_third_party_calendar_list_id`
ON
`t_third_party_calendar_subscribe_log`
(
`third_party_calendar_list_id`
);
CREATE
INDEX
`idx_email`
ON
`t_third_party_calendar_subscribe_log`
(
`email`
);
CREATE
INDEX
`idx_device_id`
ON
`t_third_party_calendar_subscribe_log`
(
`device_id`
);
\ No newline at end of file
#
alter
table
t_third_party_calendar_list
#
add
calendar_subscribe_status
tinyint
null
comment
'日历监听状态: 0:监听中 1:监听成功 2:监听失败'
after
google_access_role
;
#
#
-- t_third_party_calendar_list 订阅日志表
#
CREATE
TABLE
`t_third_party_calendar_subscribe_log`
(
#
`id`
BIGINT
NOT
NULL
COMMENT
'主键'
,
#
-- third_party_calendar_auth_id
#
`third_party_calendar_auth_id`
BIGINT
NOT
NULL
COMMENT
't_third_party_calendar_auth#third_party_calendar_auth_id'
,
#
-- third_party_calendar_list_id
#
`third_party_calendar_list_id`
BIGINT
NOT
NULL
COMMENT
't_third_party_calendar_list#third_party_calendar_list_id'
,
#
-- email
#
`email`
VARCHAR
(
255
)
NOT
NULL
COMMENT
'邮箱'
,
#
-- subscribe_status tinyint null comment '订阅状态,0:表示订阅失败,1:表示订阅成功',
#
`subscribe_status`
TINYINT
NOT
NULL
COMMENT
'订阅状态,0:表示订阅失败,1:表示订阅成功'
,
#
-- 错误栈信息
#
`error_stack`
TEXT
NULL
COMMENT
'错误栈信息'
,
#
-- device_id BIGINT NOT NULL COMMENT '设备ID',
#
`device_id`
BIGINT
NOT
NULL
COMMENT
'设备ID'
,
#
-- source_type tinyint null comment '第三方日历类型,0:表示Google,1:表示Outlook',
#
`source_type`
TINYINT
NOT
NULL
COMMENT
'第三方日历类型,0:表示Google,1:表示Outlook'
,
#
-- 创建时间插入时自动更新
#
`create_time`
DATETIME
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
#
`update_time`
DATETIME
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
#
PRIMARY
KEY
(
`id`
)
#
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'第三方日历订阅日志表'
;
#
#
CREATE
INDEX
`idx_third_party_calendar_auth_id`
ON
`t_third_party_calendar_subscribe_log`
(
`third_party_calendar_auth_id`
);
#
CREATE
INDEX
`idx_third_party_calendar_list_id`
ON
`t_third_party_calendar_subscribe_log`
(
`third_party_calendar_list_id`
);
#
CREATE
INDEX
`idx_email`
ON
`t_third_party_calendar_subscribe_log`
(
`email`
);
#
CREATE
INDEX
`idx_device_id`
ON
`t_third_party_calendar_subscribe_log`
(
`device_id`
);
\ No newline at end of file
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