diff --git a/sql/quartz.sql b/sql/quartz.sql index 52b6a092..4128a035 100644 --- a/sql/quartz.sql +++ b/sql/quartz.sql @@ -14,7 +14,7 @@ create table QRTZ_JOB_DETAILS ( requests_recovery varchar(1) not null, job_data blob null, primary key (sched_name,job_name,job_group) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 2、 存储已配置的 Trigger 的信息 @@ -39,7 +39,7 @@ create table QRTZ_TRIGGERS ( job_data blob null, primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,job_name,job_group) references QRTZ_JOB_DETAILS(sched_name,job_name,job_group) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 3、 存储简单的 Trigger,包括重复次数,间隔,以及已触发的次数 @@ -54,11 +54,11 @@ create table QRTZ_SIMPLE_TRIGGERS ( times_triggered bigint(10) not null, primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,trigger_name,trigger_group) references QRTZ_TRIGGERS(sched_name,trigger_name,trigger_group) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 4、 存储 Cron Trigger,包括 Cron 表达式和时区信息 --- ---------------------------- +-- ---------------------------- drop table if exists QRTZ_CRON_TRIGGERS; create table QRTZ_CRON_TRIGGERS ( sched_name varchar(120) not null, @@ -68,11 +68,11 @@ create table QRTZ_CRON_TRIGGERS ( time_zone_id varchar(80), primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,trigger_name,trigger_group) references QRTZ_TRIGGERS(sched_name,trigger_name,trigger_group) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型,JobStore 并不知道如何存储实例的时候) --- ---------------------------- +-- ---------------------------- drop table if exists QRTZ_BLOB_TRIGGERS; create table QRTZ_BLOB_TRIGGERS ( sched_name varchar(120) not null, @@ -81,32 +81,32 @@ create table QRTZ_BLOB_TRIGGERS ( blob_data blob null, primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,trigger_name,trigger_group) references QRTZ_TRIGGERS(sched_name,trigger_name,trigger_group) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围 --- ---------------------------- +-- ---------------------------- drop table if exists QRTZ_CALENDARS; create table QRTZ_CALENDARS ( sched_name varchar(120) not null, calendar_name varchar(200) not null, calendar blob not null, primary key (sched_name,calendar_name) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 7、 存储已暂停的 Trigger 组的信息 --- ---------------------------- +-- ---------------------------- drop table if exists QRTZ_PAUSED_TRIGGER_GRPS; create table QRTZ_PAUSED_TRIGGER_GRPS ( sched_name varchar(120) not null, trigger_group varchar(200) not null, primary key (sched_name,trigger_group) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息 --- ---------------------------- +-- ---------------------------- drop table if exists QRTZ_FIRED_TRIGGERS; create table QRTZ_FIRED_TRIGGERS ( sched_name varchar(120) not null, @@ -123,29 +123,29 @@ create table QRTZ_FIRED_TRIGGERS ( is_nonconcurrent varchar(1) null, requests_recovery varchar(1) null, primary key (sched_name,entry_id) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例 --- ---------------------------- -drop table if exists QRTZ_SCHEDULER_STATE; +-- ---------------------------- +drop table if exists QRTZ_SCHEDULER_STATE; create table QRTZ_SCHEDULER_STATE ( sched_name varchar(120) not null, instance_name varchar(200) not null, last_checkin_time bigint(13) not null, checkin_interval bigint(13) not null, primary key (sched_name,instance_name) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -- ---------------------------- -- 10、 存储程序的悲观锁的信息(假如使用了悲观锁) --- ---------------------------- +-- ---------------------------- drop table if exists QRTZ_LOCKS; create table QRTZ_LOCKS ( sched_name varchar(120) not null, lock_name varchar(40) not null, primary key (sched_name,lock_name) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; drop table if exists QRTZ_SIMPROP_TRIGGERS; create table QRTZ_SIMPROP_TRIGGERS ( @@ -165,6 +165,6 @@ create table QRTZ_SIMPROP_TRIGGERS ( bool_prop_2 varchar(1) null, primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,trigger_name,trigger_group) references QRTZ_TRIGGERS(sched_name,trigger_name,trigger_group) -) engine=innodb; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; commit; \ No newline at end of file diff --git a/sql/ry_20210608.sql b/sql/ry_20210608.sql index 91a2fdbe..a8f722f7 100644 --- a/sql/ry_20210608.sql +++ b/sql/ry_20210608.sql @@ -18,7 +18,7 @@ create table sys_dept ( update_by varchar(64) default '' comment '更新者', update_time datetime comment '更新时间', primary key (dept_id) -) engine=innodb auto_increment=200 comment = '部门表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=200 comment = '部门表'; -- ---------------------------- -- 初始化-部门表数据 @@ -60,7 +60,7 @@ create table sys_user ( update_time datetime comment '更新时间', remark varchar(500) default null comment '备注', primary key (user_id) -) engine=innodb auto_increment=100 comment = '用户信息表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=100 comment = '用户信息表'; -- ---------------------------- -- 初始化-用户信息表数据 @@ -86,7 +86,7 @@ create table sys_post update_time datetime comment '更新时间', remark varchar(500) default null comment '备注', primary key (post_id) -) engine=innodb comment = '岗位信息表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin comment = '岗位信息表'; -- ---------------------------- -- 初始化-岗位信息表数据 @@ -117,7 +117,7 @@ create table sys_role ( update_time datetime comment '更新时间', remark varchar(500) default null comment '备注', primary key (role_id) -) engine=innodb auto_increment=100 comment = '角色信息表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=100 comment = '角色信息表'; -- ---------------------------- -- 初始化-角色信息表数据 @@ -150,7 +150,7 @@ create table sys_menu ( update_time datetime comment '更新时间', remark varchar(500) default '' comment '备注', primary key (menu_id) -) engine=innodb auto_increment=2000 comment = '菜单权限表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=2000 comment = '菜单权限表'; -- ---------------------------- -- 初始化-菜单信息表数据 @@ -264,7 +264,7 @@ create table sys_user_role ( user_id bigint(20) not null comment '用户ID', role_id bigint(20) not null comment '角色ID', primary key(user_id, role_id) -) engine=innodb comment = '用户和角色关联表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin comment = '用户和角色关联表'; -- ---------------------------- -- 初始化-用户和角色关联表数据 @@ -281,7 +281,7 @@ create table sys_role_menu ( role_id bigint(20) not null comment '角色ID', menu_id bigint(20) not null comment '菜单ID', primary key(role_id, menu_id) -) engine=innodb comment = '角色和菜单关联表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin comment = '角色和菜单关联表'; -- ---------------------------- -- 初始化-角色和菜单关联表数据 @@ -384,7 +384,7 @@ create table sys_role_dept ( role_id bigint(20) not null comment '角色ID', dept_id bigint(20) not null comment '部门ID', primary key(role_id, dept_id) -) engine=innodb comment = '角色和部门关联表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin comment = '角色和部门关联表'; -- ---------------------------- -- 初始化-角色和部门关联表数据 @@ -403,7 +403,7 @@ create table sys_user_post user_id bigint(20) not null comment '用户ID', post_id bigint(20) not null comment '岗位ID', primary key (user_id, post_id) -) engine=innodb comment = '用户与岗位关联表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin comment = '用户与岗位关联表'; -- ---------------------------- -- 初始化-用户与岗位关联表数据 @@ -434,7 +434,7 @@ create table sys_oper_log ( error_msg varchar(2000) default '' comment '错误消息', oper_time datetime comment '操作时间', primary key (oper_id) -) engine=innodb auto_increment=100 comment = '操作日志记录'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=100 comment = '操作日志记录'; -- ---------------------------- @@ -454,7 +454,7 @@ create table sys_dict_type remark varchar(500) default null comment '备注', primary key (dict_id), unique (dict_type) -) engine=innodb auto_increment=100 comment = '字典类型表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=100 comment = '字典类型表'; insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', sysdate(), '', null, '用户性别列表'); insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', sysdate(), '', null, '菜单状态列表'); @@ -488,7 +488,7 @@ create table sys_dict_data update_time datetime comment '更新时间', remark varchar(500) default null comment '备注', primary key (dict_code) -) engine=innodb auto_increment=100 comment = '字典数据表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=100 comment = '字典数据表'; insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', sysdate(), '', null, '性别男'); insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别女'); @@ -536,7 +536,7 @@ create table sys_config ( update_time datetime comment '更新时间', remark varchar(500) default null comment '备注', primary key (config_id) -) engine=innodb auto_increment=100 comment = '参数配置表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=100 comment = '参数配置表'; insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' ); insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '初始化密码 123456' ); @@ -555,7 +555,7 @@ create table sys_logininfor ( msg varchar(255) default '' comment '提示信息', access_time datetime comment '访问时间', primary key (info_id) -) engine=innodb auto_increment=100 comment = '系统访问记录'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=100 comment = '系统访问记录'; -- ---------------------------- @@ -577,7 +577,7 @@ create table sys_job ( update_time datetime comment '更新时间', remark varchar(500) default '' comment '备注信息', primary key (job_id, job_name, job_group) -) engine=innodb auto_increment=100 comment = '定时任务调度表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=100 comment = '定时任务调度表'; insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); @@ -598,7 +598,7 @@ create table sys_job_log ( exception_info varchar(2000) default '' comment '异常信息', create_time datetime comment '创建时间', primary key (job_log_id) -) engine=innodb comment = '定时任务调度日志表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin comment = '定时任务调度日志表'; -- ---------------------------- @@ -617,7 +617,7 @@ create table sys_notice ( update_time datetime comment '更新时间', remark varchar(255) default null comment '备注', primary key (notice_id) -) engine=innodb auto_increment=10 comment = '通知公告表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=10 comment = '通知公告表'; -- ---------------------------- -- 初始化-公告信息表数据 @@ -652,7 +652,7 @@ create table gen_table ( update_time datetime comment '更新时间', remark varchar(500) default null comment '备注', primary key (table_id) -) engine=innodb auto_increment=1 comment = '代码生成业务表'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=1 comment = '代码生成业务表'; -- ---------------------------- @@ -683,4 +683,4 @@ create table gen_table_column ( update_by varchar(64) default '' comment '更新者', update_time datetime comment '更新时间', primary key (column_id) -) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; +) engine=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_bin auto_increment=1 comment = '代码生成业务表字段';