From 7c0f41c785ef1ae7b121cf7c6127e7566da866a5 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 11 三月 2022 13:00:09 +0800 Subject: [PATCH] update 确保更好的适配 多数据库 主键策略统一改为 雪花ID --- script/sql/ry_vue_4.0.sql | 80 ++++++++++++++++++++-------------------- 1 files changed, 40 insertions(+), 40 deletions(-) diff --git a/script/sql/ry_vue_4.0.sql b/script/sql/ry_vue_4.0.sql index 9b57bd0..1fe490e 100644 --- a/script/sql/ry_vue_4.0.sql +++ b/script/sql/ry_vue_4.0.sql @@ -3,7 +3,7 @@ -- ---------------------------- drop table if exists sys_dept; create table sys_dept ( - dept_id bigint(20) not null auto_increment comment '閮ㄩ棬id', + dept_id bigint(20) not null comment '閮ㄩ棬id', parent_id bigint(20) default 0 comment '鐖堕儴闂╥d', ancestors varchar(50) default '' comment '绁栫骇鍒楄〃', dept_name varchar(30) default '' comment '閮ㄩ棬鍚嶇О', @@ -18,7 +18,7 @@ update_by varchar(64) default '' comment '鏇存柊鑰�', update_time datetime comment '鏇存柊鏃堕棿', primary key (dept_id) -) engine=innodb auto_increment=200 comment = '閮ㄩ棬琛�'; +) engine=innodb comment = '閮ㄩ棬琛�'; -- ---------------------------- -- 鍒濆鍖�-閮ㄩ棬琛ㄦ暟鎹� @@ -40,7 +40,7 @@ -- ---------------------------- drop table if exists sys_user; create table sys_user ( - user_id bigint(20) not null auto_increment comment '鐢ㄦ埛ID', + user_id bigint(20) not null comment '鐢ㄦ埛ID', dept_id bigint(20) default null comment '閮ㄩ棬ID', user_name varchar(30) not null comment '鐢ㄦ埛璐﹀彿', nick_name varchar(30) not null comment '鐢ㄦ埛鏄电О', @@ -60,7 +60,7 @@ update_time datetime comment '鏇存柊鏃堕棿', remark varchar(500) default null comment '澶囨敞', primary key (user_id) -) engine=innodb auto_increment=100 comment = '鐢ㄦ埛淇℃伅琛�'; +) engine=innodb comment = '鐢ㄦ埛淇℃伅琛�'; -- ---------------------------- -- 鍒濆鍖�-鐢ㄦ埛淇℃伅琛ㄦ暟鎹� @@ -75,14 +75,14 @@ drop table if exists sys_post; create table sys_post ( - post_id bigint(20) not null auto_increment comment '宀椾綅ID', + post_id bigint(20) not null comment '宀椾綅ID', post_code varchar(64) not null comment '宀椾綅缂栫爜', post_name varchar(50) not null comment '宀椾綅鍚嶇О', post_sort int(4) not null comment '鏄剧ず椤哄簭', status char(1) not null comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�', create_by varchar(64) default '' comment '鍒涘缓鑰�', create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', + update_by varchar(64) default '' comment '鏇存柊鑰�', update_time datetime comment '鏇存柊鏃堕棿', remark varchar(500) default null comment '澶囨敞', primary key (post_id) @@ -102,7 +102,7 @@ -- ---------------------------- drop table if exists sys_role; create table sys_role ( - role_id bigint(20) not null auto_increment comment '瑙掕壊ID', + role_id bigint(20) not null comment '瑙掕壊ID', role_name varchar(30) not null comment '瑙掕壊鍚嶇О', role_key varchar(100) not null comment '瑙掕壊鏉冮檺瀛楃涓�', role_sort int(4) not null comment '鏄剧ず椤哄簭', @@ -117,7 +117,7 @@ update_time datetime comment '鏇存柊鏃堕棿', remark varchar(500) default null comment '澶囨敞', primary key (role_id) -) engine=innodb auto_increment=100 comment = '瑙掕壊淇℃伅琛�'; +) engine=innodb comment = '瑙掕壊淇℃伅琛�'; -- ---------------------------- -- 鍒濆鍖�-瑙掕壊淇℃伅琛ㄦ暟鎹� @@ -131,7 +131,7 @@ -- ---------------------------- drop table if exists sys_menu; create table sys_menu ( - menu_id bigint(20) not null auto_increment comment '鑿滃崟ID', + menu_id bigint(20) not null comment '鑿滃崟ID', menu_name varchar(50) not null comment '鑿滃崟鍚嶇О', parent_id bigint(20) default 0 comment '鐖惰彍鍗旾D', order_num int(4) default 0 comment '鏄剧ず椤哄簭', @@ -151,7 +151,7 @@ update_time datetime comment '鏇存柊鏃堕棿', remark varchar(500) default '' comment '澶囨敞', primary key (menu_id) -) engine=innodb auto_increment=2000 comment = '鑿滃崟鏉冮檺琛�'; +) engine=innodb comment = '鑿滃崟鏉冮檺琛�'; -- ---------------------------- -- 鍒濆鍖�-鑿滃崟淇℃伅琛ㄦ暟鎹� @@ -412,7 +412,7 @@ -- ---------------------------- drop table if exists sys_oper_log; create table sys_oper_log ( - oper_id bigint(20) not null auto_increment comment '鏃ュ織涓婚敭', + oper_id bigint(20) not null comment '鏃ュ織涓婚敭', title varchar(50) default '' comment '妯″潡鏍囬', business_type int(2) default 0 comment '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�', method varchar(100) default '' comment '鏂规硶鍚嶇О', @@ -429,7 +429,7 @@ error_msg varchar(2000) default '' comment '閿欒娑堟伅', oper_time datetime comment '鎿嶄綔鏃堕棿', primary key (oper_id) -) engine=innodb auto_increment=100 comment = '鎿嶄綔鏃ュ織璁板綍'; +) engine=innodb comment = '鎿嶄綔鏃ュ織璁板綍'; -- ---------------------------- @@ -438,7 +438,7 @@ drop table if exists sys_dict_type; create table sys_dict_type ( - dict_id bigint(20) not null auto_increment comment '瀛楀吀涓婚敭', + dict_id bigint(20) not null comment '瀛楀吀涓婚敭', dict_name varchar(100) default '' comment '瀛楀吀鍚嶇О', dict_type varchar(100) default '' comment '瀛楀吀绫诲瀷', status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�', @@ -449,7 +449,7 @@ remark varchar(500) default null comment '澶囨敞', primary key (dict_id), unique (dict_type) -) engine=innodb auto_increment=100 comment = '瀛楀吀绫诲瀷琛�'; +) engine=innodb 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, '鑿滃崟鐘舵�佸垪琛�'); @@ -467,7 +467,7 @@ drop table if exists sys_dict_data; create table sys_dict_data ( - dict_code bigint(20) not null auto_increment comment '瀛楀吀缂栫爜', + dict_code bigint(20) not null comment '瀛楀吀缂栫爜', dict_sort int(4) default 0 comment '瀛楀吀鎺掑簭', dict_label varchar(100) default '' comment '瀛楀吀鏍囩', dict_value varchar(100) default '' comment '瀛楀吀閿��', @@ -482,7 +482,7 @@ update_time datetime comment '鏇存柊鏃堕棿', remark varchar(500) default null comment '澶囨敞', primary key (dict_code) -) engine=innodb auto_increment=100 comment = '瀛楀吀鏁版嵁琛�'; +) engine=innodb 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, '鎬у埆濂�'); @@ -515,7 +515,7 @@ -- ---------------------------- drop table if exists sys_config; create table sys_config ( - config_id int(5) not null auto_increment comment '鍙傛暟涓婚敭', + config_id int(5) not null comment '鍙傛暟涓婚敭', config_name varchar(100) default '' comment '鍙傛暟鍚嶇О', config_key varchar(100) default '' comment '鍙傛暟閿悕', config_value varchar(500) default '' comment '鍙傛暟閿��', @@ -526,7 +526,7 @@ update_time datetime comment '鏇存柊鏃堕棿', remark varchar(500) default null comment '澶囨敞', primary key (config_id) -) engine=innodb auto_increment=100 comment = '鍙傛暟閰嶇疆琛�'; +) engine=innodb 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' ); @@ -541,7 +541,7 @@ -- ---------------------------- drop table if exists sys_logininfor; create table sys_logininfor ( - info_id bigint(20) not null auto_increment comment '璁块棶ID', + info_id bigint(20) not null comment '璁块棶ID', user_name varchar(50) default '' comment '鐢ㄦ埛璐﹀彿', ipaddr varchar(128) default '' comment '鐧诲綍IP鍦板潃', login_location varchar(255) default '' comment '鐧诲綍鍦扮偣', @@ -551,7 +551,7 @@ msg varchar(255) default '' comment '鎻愮ず娑堟伅', login_time datetime comment '璁块棶鏃堕棿', primary key (info_id) -) engine=innodb auto_increment=100 comment = '绯荤粺璁块棶璁板綍'; +) engine=innodb comment = '绯荤粺璁块棶璁板綍'; -- ---------------------------- @@ -559,7 +559,7 @@ -- ---------------------------- drop table if exists sys_notice; create table sys_notice ( - notice_id int(4) not null auto_increment comment '鍏憡ID', + notice_id int(4) not null comment '鍏憡ID', notice_title varchar(50) not null comment '鍏憡鏍囬', notice_type char(1) not null comment '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�', notice_content longblob default null comment '鍏憡鍐呭', @@ -570,7 +570,7 @@ update_time datetime comment '鏇存柊鏃堕棿', remark varchar(255) default null comment '澶囨敞', primary key (notice_id) -) engine=innodb auto_increment=10 comment = '閫氱煡鍏憡琛�'; +) engine=innodb comment = '閫氱煡鍏憡琛�'; -- ---------------------------- -- 鍒濆鍖�-鍏憡淇℃伅琛ㄦ暟鎹� @@ -584,7 +584,7 @@ -- ---------------------------- drop table if exists gen_table; create table gen_table ( - table_id bigint(20) not null auto_increment comment '缂栧彿', + table_id bigint(20) not null comment '缂栧彿', table_name varchar(200) default '' comment '琛ㄥ悕绉�', table_comment varchar(500) default '' comment '琛ㄦ弿杩�', sub_table_name varchar(64) default null comment '鍏宠仈瀛愯〃鐨勮〃鍚�', @@ -605,7 +605,7 @@ update_time datetime comment '鏇存柊鏃堕棿', remark varchar(500) default null comment '澶囨敞', primary key (table_id) -) engine=innodb auto_increment=1 comment = '浠g爜鐢熸垚涓氬姟琛�'; +) engine=innodb comment = '浠g爜鐢熸垚涓氬姟琛�'; -- ---------------------------- @@ -613,7 +613,7 @@ -- ---------------------------- drop table if exists gen_table_column; create table gen_table_column ( - column_id bigint(20) not null auto_increment comment '缂栧彿', + column_id bigint(20) not null comment '缂栧彿', table_id varchar(64) comment '褰掑睘琛ㄧ紪鍙�', column_name varchar(200) comment '鍒楀悕绉�', column_comment varchar(500) comment '鍒楁弿杩�', @@ -636,18 +636,18 @@ update_by varchar(64) default '' comment '鏇存柊鑰�', update_time datetime comment '鏇存柊鏃堕棿', primary key (column_id) -) engine=innodb auto_increment=1 comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�'; +) engine=innodb comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�'; -- ---------------------------- -- OSS瀵硅薄瀛樺偍琛� -- ---------------------------- drop table if exists sys_oss; create table sys_oss ( - oss_id bigint(20) not null auto_increment comment '瀵硅薄瀛樺偍涓婚敭', + oss_id bigint(20) not null comment '瀵硅薄瀛樺偍涓婚敭', file_name varchar(255) not null default '' comment '鏂囦欢鍚�', original_name varchar(255) not null default '' comment '鍘熷悕', file_suffix varchar(10) not null default '' comment '鏂囦欢鍚庣紑鍚�', - url varchar(500) not null comment 'URL鍦板潃', + url varchar(500) not null comment 'URL鍦板潃', create_time datetime default null comment '鍒涘缓鏃堕棿', create_by varchar(64) default '' comment '涓婁紶浜�', update_time datetime default null comment '鏇存柊鏃堕棿', @@ -661,19 +661,19 @@ -- ---------------------------- drop table if exists sys_oss_config; create table sys_oss_config ( - oss_config_id bigint(20) not null auto_increment comment '涓诲缓', - config_key varchar(255) not null default '' comment '閰嶇疆key', - access_key varchar(255) default '' comment 'accessKey', - secret_key varchar(255) default '' comment '绉橀挜', - bucket_name varchar(255) default '' comment '妗跺悕绉�', - prefix varchar(255) default '' comment '鍓嶇紑', - endpoint varchar(255) default '' comment '璁块棶绔欑偣', - is_https char(1) default 'N' comment '鏄惁https锛圷=鏄�,N=鍚︼級', - region varchar(255) default '' comment '鍩�', - status char(1) default '1' comment '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�', + oss_config_id bigint(20) not null comment '涓诲缓', + config_key varchar(255) not null default '' comment '閰嶇疆key', + access_key varchar(255) default '' comment 'accessKey', + secret_key varchar(255) default '' comment '绉橀挜', + bucket_name varchar(255) default '' comment '妗跺悕绉�', + prefix varchar(255) default '' comment '鍓嶇紑', + endpoint varchar(255) default '' comment '璁块棶绔欑偣', + is_https char(1) default 'N' comment '鏄惁https锛圷=鏄�,N=鍚︼級', + region varchar(255) default '' comment '鍩�', + status char(1) default '1' comment '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�', ext1 varchar(255) default '' comment '鎵╁睍瀛楁', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime default null comment '鍒涘缓鏃堕棿', + create_by varchar(64) default '' comment '鍒涘缓鑰�', + create_time datetime default null comment '鍒涘缓鏃堕棿', update_by varchar(64) default '' comment '鏇存柊鑰�', update_time datetime default null comment '鏇存柊鏃堕棿', remark varchar(500) default null comment '澶囨敞', -- Gitblit v1.9.3