Commit 52504e3d by mercymodest

feat:- add sql

parent c0147eed
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
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