From 17ecce9978b90b5e34ee07138e7c6cfcf01dd9f7 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期四, 13 七月 2023 19:00:20 +0800
Subject: [PATCH] reset 删除 三方表默认数据 错误理解不需要此数据

---
 script/sql/postgres/postgres_ry_vue_5.X.sql |  182 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 157 insertions(+), 25 deletions(-)

diff --git a/script/sql/postgres/postgres_ry_vue_5.X.sql b/script/sql/postgres/postgres_ry_vue_5.X.sql
index 65857bf..d2f39f0 100644
--- a/script/sql/postgres/postgres_ry_vue_5.X.sql
+++ b/script/sql/postgres/postgres_ry_vue_5.X.sql
@@ -1,4 +1,72 @@
 -- ----------------------------
+-- 绗笁鏂瑰钩鍙版巿鏉冭〃
+-- ----------------------------
+create table sys_social
+(
+    id                 int8             not null,
+    user_id            int8             not null,
+    tenant_id          varchar(20)      default null::varchar,
+    auth_id            varchar(255)     not null,
+    source             varchar(255)     not null,
+    open_id            varchar(255)     default null::varchar,
+    user_name          varchar(30)      not null,
+    nick_name          varchar(30)      default ''::varchar,
+    email              varchar(255)     default ''::varchar,
+    avatar             varchar(500)     default ''::varchar,
+    access_token       varchar(255)     not null,
+    expire_in          int8             default null,
+    refresh_token      varchar(255)     default null::varchar,
+    access_code        varchar(255)     default null::varchar,
+    union_id           varchar(255)     default null::varchar,
+    scope              varchar(255)     default null::varchar,
+    token_type         varchar(255)     default null::varchar,
+    id_token           varchar(255)     default null::varchar,
+    mac_algorithm      varchar(255)     default null::varchar,
+    mac_key            varchar(255)     default null::varchar,
+    code               varchar(255)     default null::varchar,
+    oauth_token        varchar(255)     default null::varchar,
+    oauth_token_secret varchar(255)     default null::varchar,
+    create_dept        int8,
+    create_by          int8,
+    create_time        timestamp,
+    update_by          int8,
+    update_time        timestamp,
+    del_flag           char             default '0'::bpchar,
+    constraint "pk_sys_social" primary key (id)
+);
+
+comment on table   sys_social                   is '绀句細鍖栧叧绯昏〃';
+comment on column  sys_social.id                is '涓婚敭';
+comment on column  sys_social.user_id           is '鐢ㄦ埛ID';
+comment on column  sys_social.tenant_id         is '绉熸埛id';
+comment on column  sys_social.auth_id           is '骞冲彴+骞冲彴鍞竴id';
+comment on column  sys_social.source            is '鐢ㄦ埛鏉ユ簮';
+comment on column  sys_social.open_id           is '骞冲彴缂栧彿鍞竴id';
+comment on column  sys_social.user_name         is '鐧诲綍璐﹀彿';
+comment on column  sys_social.nick_name         is '鐢ㄦ埛鏄电О';
+comment on column  sys_social.email             is '鐢ㄦ埛閭';
+comment on column  sys_social.avatar            is '澶村儚鍦板潃';
+comment on column  sys_social.access_token      is '鐢ㄦ埛鐨勬巿鏉冧护鐗�';
+comment on column  sys_social.expire_in         is '鐢ㄦ埛鐨勬巿鏉冧护鐗岀殑鏈夋晥鏈燂紝閮ㄥ垎骞冲彴鍙兘娌℃湁';
+comment on column  sys_social.refresh_token     is '鍒锋柊浠ょ墝锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�';
+comment on column  sys_social.access_code       is '骞冲彴鐨勬巿鏉冧俊鎭紝閮ㄥ垎骞冲彴鍙兘娌℃湁';
+comment on column  sys_social.union_id          is '鐢ㄦ埛鐨� unionid';
+comment on column  sys_social.scope             is '鎺堜簣鐨勬潈闄愶紝閮ㄥ垎骞冲彴鍙兘娌℃湁';
+comment on column  sys_social.token_type        is '涓埆骞冲彴鐨勬巿鏉冧俊鎭紝閮ㄥ垎骞冲彴鍙兘娌℃湁';
+comment on column  sys_social.id_token          is 'id token锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�';
+comment on column  sys_social.mac_algorithm     is '灏忕背骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁';
+comment on column  sys_social.mac_key           is '灏忕背骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁';
+comment on column  sys_social.code              is '鐢ㄦ埛鐨勬巿鏉僣ode锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�';
+comment on column  sys_social.oauth_token       is 'Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁';
+comment on column  sys_social.oauth_token_secret is 'Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁';
+comment on column  sys_social.create_dept       is '鍒涘缓閮ㄩ棬';
+comment on column  sys_social.create_by         is '鍒涘缓鑰�';
+comment on column  sys_social.create_time       is '鍒涘缓鏃堕棿';
+comment on column  sys_social.update_by         is '鏇存柊鑰�';
+comment on column  sys_social.update_time       is '鏇存柊鏃堕棿';
+comment on column  sys_social.del_flag          is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+
+-- ----------------------------
 -- 绉熸埛琛�
 -- ----------------------------
 drop table if exists sys_tenant;
@@ -100,7 +168,7 @@
 create table if not exists sys_dept
 (
     dept_id     int8,
-    tenant_id   varchar(20) not null,
+    tenant_id   varchar(20) default '000000'::varchar,
     parent_id   int8        default 0,
     ancestors   varchar(500)default ''::varchar,
     dept_name   varchar(30) default ''::varchar,
@@ -157,7 +225,7 @@
 create table if not exists sys_user
 (
     user_id     int8,
-    tenant_id   varchar(20)  not null,
+    tenant_id   varchar(20)  default '000000'::varchar,
     dept_id     int8,
     user_name   varchar(30)  not null,
     nick_name   varchar(30)  not null,
@@ -218,7 +286,7 @@
 create table if not exists sys_post
 (
     post_id     int8,
-    tenant_id   varchar(20) not null,
+    tenant_id   varchar(20) default '000000'::varchar,
     post_code   varchar(64) not null,
     post_name   varchar(50) not null,
     post_sort   int4        not null,
@@ -261,7 +329,7 @@
 create table if not exists sys_role
 (
     role_id             int8,
-    tenant_id           varchar(20)  not null,
+    tenant_id           varchar(20)  default '000000'::varchar,
     role_name           varchar(30)  not null,
     role_key            varchar(100) not null,
     role_sort           int4         not null,
@@ -363,7 +431,7 @@
 insert into sys_menu values('6', '绯荤粺绠$悊', '0', '2', 'tenant',           null, '', '1', '0', 'M', '0', '0', '', 'chart',    103, 1, now(), null, null, '绉熸埛绠$悊鐩綍');
 insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '3', 'monitor',          null, '', '1', '0', 'M', '0', '0', '', 'monitor',  103, 1, now(), null, null, '绯荤粺鐩戞帶鐩綍');
 insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '4', 'tool',             null, '', '1', '0', 'M', '0', '0', '', 'tool',     103, 1, now(), null, null, '绯荤粺宸ュ叿鐩綍');
-insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', '0', '0', 'M', '0', '0', '', 'guide',    103, 1, now(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
+insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/dromara/RuoYi-Vue-Plus', null, '', '0', '0', 'M', '0', '0', '', 'guide',    103, 1, now(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
 -- 浜岀骇鑿滃崟
 insert into sys_menu values('100',  '鐢ㄦ埛绠$悊',     '1',   '1', 'user',             'system/user/index',            '', '1', '0', 'C', '0', '0', 'system:user:list',            'user',          103, 1, now(), null, null, '鐢ㄦ埛绠$悊鑿滃崟');
 insert into sys_menu values('101',  '瑙掕壊绠$悊',     '1',   '2', 'role',             'system/role/index',            '', '1', '0', 'C', '0', '0', 'system:role:list',            'peoples',       103, 1, now(), null, null, '瑙掕壊绠$悊鑿滃崟');
@@ -379,14 +447,15 @@
 insert into sys_menu values('114',  '琛ㄥ崟鏋勫缓',     '3',   '1', 'build',            'tool/build/index',             '', '1', '0', 'C', '0', '0', 'tool:build:list',             'build',         103, 1, now(), null, null, '琛ㄥ崟鏋勫缓鑿滃崟');
 insert into sys_menu values('115',  '浠g爜鐢熸垚',     '3',   '2', 'gen',              'tool/gen/index',               '', '1', '0', 'C', '0', '0', 'tool:gen:list',               'code',          103, 1, now(), null, null, '浠g爜鐢熸垚鑿滃崟');
 insert into sys_menu values('121',  '绉熸埛绠$悊',     '6',   '1', 'tenant',           'system/tenant/index',          '', '1', '0', 'C', '0', '0', 'system:tenant:list',          'list',          103, 1, now(), null, null, '绉熸埛绠$悊鑿滃崟');
-insert into sys_menu values('122',  '绉熸埛濂楅绠$悊',  '6',   '2', 'tenantPackage',    'system/tenantPackage/index',   '', '1', '0', 'C', '0', '0', 'system:tenantPackage:list',   'form',          103, 1, now(), null, null, '绉熸埛濂楅绠$悊鑿滃崟');
+insert into sys_menu values('122',  '绉熸埛濂楅绠$悊', '6',   '2', 'tenantPackage',    'system/tenantPackage/index',   '', '1', '0', 'C', '0', '0', 'system:tenantPackage:list',   'form',          103, 1, now(), null, null, '绉熸埛濂楅绠$悊鑿滃崟');
+insert into sys_menu values('123',  '瀹㈡埛绔鐞�',   '1',   '11', 'client',           'system/client/index',          '', '1', '0', 'C', '0', '0', 'system:client:list',          'international', 103, 1, now(), null, null, '瀹㈡埛绔鐞嗚彍鍗�');
 
 -- springboot-admin鐩戞帶
 insert into sys_menu values('117',  'Admin鐩戞帶',   '2',   '5',  'Admin',            'monitor/admin/index',         '', '1', '0', 'C', '0', '0', 'monitor:admin:list',          'dashboard',     103, 1, now(), null, null, 'Admin鐩戞帶鑿滃崟');
 -- oss鑿滃崟
 insert into sys_menu values('118',  '鏂囦欢绠$悊',     '1',   '10', 'oss',              'system/oss/index',            '', '1', '0', 'C', '0', '0', 'system:oss:list',             'upload',        103, 1, now(), null, null, '鏂囦欢绠$悊鑿滃崟');
--- xxl-job-admin鎺у埗鍙�
-insert into sys_menu values('120',  '浠诲姟璋冨害涓績',  '2',   '5',  'XxlJob',           'monitor/xxljob/index',        '', '1', '0', 'C', '0', '0', 'monitor:xxljob:list',         'job',           103, 1, now(), null, null, 'Xxl-Job鎺у埗鍙拌彍鍗�');
+-- powerjob server鎺у埗鍙�
+insert into sys_menu values('120',  '浠诲姟璋冨害涓績',  '2',   '5',  'powerjob',           'monitor/powerjob/index',        '', '1', '0', 'C', '0', '0', 'monitor:powerjob:list',         'job',           103, 1, now(), null, null, 'PowerJob鎺у埗鍙拌彍鍗�');
 
 -- 涓夌骇鑿滃崟
 insert into sys_menu values('500',  '鎿嶄綔鏃ュ織', '108', '1', 'operlog',    'monitor/operlog/index',    '', '1', '0', 'C', '0', '0', 'monitor:operlog:list',    'form',          103, 1, now(), null, null, '鎿嶄綔鏃ュ織鑿滃崟');
@@ -477,7 +546,12 @@
 insert into sys_menu values('1613', '绉熸埛濂楅淇敼', '122', '3', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenantPackage:edit',    '#', 103, 1, now(), null, null, '');
 insert into sys_menu values('1614', '绉熸埛濂楅鍒犻櫎', '122', '4', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenantPackage:remove',  '#', 103, 1, now(), null, null, '');
 insert into sys_menu values('1615', '绉熸埛濂楅瀵煎嚭', '122', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenantPackage:export',  '#', 103, 1, now(), null, null, '');
-
+-- 瀹㈡埛绔鐞嗘寜閽�
+insert into sys_menu values('1061', '瀹㈡埛绔鐞嗘煡璇�', '123', '1',  '#', '', '', '1', '0', 'F', '0', '0', 'system:client:query',        '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1062', '瀹㈡埛绔鐞嗘柊澧�', '123', '2',  '#', '', '', '1', '0', 'F', '0', '0', 'system:client:add',          '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1063', '瀹㈡埛绔鐞嗕慨鏀�', '123', '3',  '#', '', '', '1', '0', 'F', '0', '0', 'system:client:edit',         '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1064', '瀹㈡埛绔鐞嗗垹闄�', '123', '4',  '#', '', '', '1', '0', 'F', '0', '0', 'system:client:remove',       '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1065', '瀹㈡埛绔鐞嗗鍑�', '123', '5',  '#', '', '', '1', '0', 'F', '0', '0', 'system:client:export',       '#', 103, 1, now(), null, null, '');
 
 -- ----------------------------
 -- 6銆佺敤鎴峰拰瑙掕壊鍏宠仈琛�  鐢ㄦ埛N-1瑙掕壊
@@ -598,6 +672,11 @@
 insert into sys_role_menu values ('2', '1058');
 insert into sys_role_menu values ('2', '1059');
 insert into sys_role_menu values ('2', '1060');
+insert into sys_role_menu values ('2', '1061');
+insert into sys_role_menu values ('2', '1062');
+insert into sys_role_menu values ('2', '1063');
+insert into sys_role_menu values ('2', '1064');
+insert into sys_role_menu values ('2', '1065');
 
 -- ----------------------------
 -- 8銆佽鑹插拰閮ㄩ棬鍏宠仈琛�  瑙掕壊1-N閮ㄩ棬
@@ -651,7 +730,7 @@
 create table if not exists sys_oper_log
 (
     oper_id        int8,
-    tenant_id      varchar(20)   not null,
+    tenant_id      varchar(20)   default '000000'::varchar,
     title          varchar(50)   default ''::varchar,
     business_type  int4          default 0,
     method         varchar(100)  default ''::varchar,
@@ -671,9 +750,9 @@
     constraint sys_oper_log_pk primary key (oper_id)
 );
 
-create unique index idx_sys_oper_log_bt ON sys_oper_log (business_type);
-create unique index idx_sys_oper_log_s ON sys_oper_log (status);
-create unique index idx_sys_oper_log_ot ON sys_oper_log (oper_time);
+create index idx_sys_oper_log_bt ON sys_oper_log (business_type);
+create index idx_sys_oper_log_s ON sys_oper_log (status);
+create index idx_sys_oper_log_ot ON sys_oper_log (oper_time);
 
 comment on table sys_oper_log                   is '鎿嶄綔鏃ュ織璁板綍';
 comment on column sys_oper_log.oper_id          is '鏃ュ織涓婚敭';
@@ -702,7 +781,7 @@
 create table if not exists sys_dict_type
 (
     dict_id     int8,
-    tenant_id   varchar(20)  not null,
+    tenant_id   varchar(20)  default '000000'::varchar,
     dict_name   varchar(100) default ''::varchar,
     dict_type   varchar(100) default ''::varchar,
     status      char         default '0'::bpchar,
@@ -737,8 +816,9 @@
 insert into sys_dict_type values(7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type',     '0', 103, 1, now(), null, null, '閫氱煡绫诲瀷鍒楄〃');
 insert into sys_dict_type values(8, '000000', '閫氱煡鐘舵��', 'sys_notice_status',   '0', 103, 1, now(), null, null, '閫氱煡鐘舵�佸垪琛�');
 insert into sys_dict_type values(9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type',       '0', 103, 1, now(), null, null, '鎿嶄綔绫诲瀷鍒楄〃');
-insert into sys_dict_type values(10, '000000', '绯荤粺鐘舵��', 'sys_common_status',   '0', 103, 1, now(), null, null, '鐧诲綍鐘舵�佸垪琛�');
-
+insert into sys_dict_type values(10, '000000', '绯荤粺鐘舵��', 'sys_common_status',  '0', 103, 1, now(), null, null, '鐧诲綍鐘舵�佸垪琛�');
+insert into sys_dict_type values(11, '000000', '鎺堟潈绫诲瀷', 'sys_grant_type',     '0', 103, 1, now(), null, null, '璁よ瘉鎺堟潈绫诲瀷');
+insert into sys_dict_type values(12, '000000', '璁惧绫诲瀷', 'sys_device_type',    '0', 103, 1, now(), null, null, '瀹㈡埛绔澶囩被鍨�');
 
 -- ----------------------------
 -- 12銆佸瓧鍏告暟鎹〃
@@ -747,7 +827,7 @@
 create table if not exists sys_dict_data
 (
     dict_code   int8,
-    tenant_id   varchar(20)  not null,
+    tenant_id   varchar(20)  default '000000'::varchar,
     dict_sort   int4         default 0,
     dict_label  varchar(100) default ''::varchar,
     dict_value  varchar(100) default ''::varchar,
@@ -808,6 +888,13 @@
 insert into sys_dict_data values(26, '000000', 9,  '娓呯┖鏁版嵁', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '娓呯┖鎿嶄綔');
 insert into sys_dict_data values(27, '000000', 1,  '鎴愬姛',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 103, 1, now(), null, null, '姝e父鐘舵��');
 insert into sys_dict_data values(28, '000000', 2,  '澶辫触',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍋滅敤鐘舵��');
+insert into sys_dict_data values(30, '000000', 0,  '瀵嗙爜璁よ瘉', 'password',   'sys_grant_type',   '',   'default', 'N', '0', 103, 1, now(), null, null, '瀵嗙爜璁よ瘉');
+insert into sys_dict_data values(31, '000000', 0,  '鐭俊璁よ瘉', 'sms',        'sys_grant_type',   '',   'default', 'N', '0', 103, 1, now(), null, null, '鐭俊璁よ瘉');
+insert into sys_dict_data values(32, '000000', 0,  '閭欢璁よ瘉', 'email',      'sys_grant_type',   '',   'default', 'N', '0', 103, 1, now(), null, null, '閭欢璁よ瘉');
+insert into sys_dict_data values(33, '000000', 0,  '灏忕▼搴忚璇�', 'xcx',      'sys_grant_type',   '',   'default', 'N', '0', 103, 1, now(), null, null, '灏忕▼搴忚璇�');
+insert into sys_dict_data values(34, '000000', 0,  '涓夋柟鐧诲綍璁よ瘉', 'social', 'sys_grant_type',   '',   'default', 'N', '0', 103, 1, now(), null, null, '涓夋柟鐧诲綍璁よ瘉');
+insert into sys_dict_data values(35, '000000', 0,  'PC绔�', 'pc',            'sys_device_type',   '',   'default', 'N', '0', 103, 1, now(), null, null, 'PC绔�');
+insert into sys_dict_data values(36, '000000', 0,  'APP绔�', 'app',          'sys_device_type',   '',   'default', 'N', '0', 103, 1, now(), null, null, 'APP绔�');
 
 
 -- ----------------------------
@@ -817,7 +904,7 @@
 create table if not exists sys_config
 (
     config_id    int8,
-    tenant_id    varchar(20)  not null,
+    tenant_id    varchar(20)  default '000000'::varchar,
     config_name  varchar(100) default ''::varchar,
     config_key   varchar(100) default ''::varchar,
     config_value varchar(500) default ''::varchar,
@@ -859,7 +946,7 @@
 create table if not exists sys_logininfor
 (
     info_id        int8,
-    tenant_id      varchar(20)  not null,
+    tenant_id      varchar(20)  default '000000'::varchar,
     user_name      varchar(50)  default ''::varchar,
     ipaddr         varchar(128) default ''::varchar,
     login_location varchar(255) default ''::varchar,
@@ -871,8 +958,8 @@
     constraint sys_logininfor_pk primary key (info_id)
 );
 
-create unique index idx_sys_logininfor_s ON sys_logininfor (status);
-create unique index idx_sys_logininfor_lt ON sys_logininfor (login_time);
+create index idx_sys_logininfor_s ON sys_logininfor (status);
+create index idx_sys_logininfor_lt ON sys_logininfor (login_time);
 
 comment on table sys_logininfor                 is '绯荤粺璁块棶璁板綍';
 comment on column sys_logininfor.info_id        is '璁块棶ID';
@@ -893,7 +980,7 @@
 create table if not exists sys_notice
 (
     notice_id      int8,
-    tenant_id      varchar(20)  not null,
+    tenant_id      varchar(20)  default '000000'::varchar,
     notice_title   varchar(50)  not null,
     notice_type    char         not null,
     notice_content text,
@@ -935,6 +1022,7 @@
 create table if not exists gen_table
 (
     table_id          int8,
+    data_name         varchar(200)  default ''::varchar,
     table_name        varchar(200)  default ''::varchar,
     table_comment     varchar(500)  default ''::varchar,
     sub_table_name    varchar(64)   default ''::varchar,
@@ -960,6 +1048,7 @@
 
 comment on table gen_table is '浠g爜鐢熸垚涓氬姟琛�';
 comment on column gen_table.table_id is '缂栧彿';
+comment on column gen_table.data_name is '鏁版嵁婧愬悕绉�';
 comment on column gen_table.table_name is '琛ㄥ悕绉�';
 comment on column gen_table.table_comment is '琛ㄦ弿杩�';
 comment on column gen_table.sub_table_name is '鍏宠仈瀛愯〃鐨勮〃鍚�';
@@ -1045,7 +1134,7 @@
 create table if not exists sys_oss
 (
     oss_id        int8,
-    tenant_id     varchar(20)  not null,
+    tenant_id     varchar(20)  default '000000'::varchar,
     file_name     varchar(255) default ''::varchar not null,
     original_name varchar(255) default ''::varchar not null,
     file_suffix   varchar(10)  default ''::varchar not null,
@@ -1080,7 +1169,7 @@
 create table if not exists sys_oss_config
 (
     oss_config_id int8,
-    tenant_id     varchar(20)  not null,
+    tenant_id     varchar(20)  default '000000'::varchar,
     config_key    varchar(20)  default ''::varchar not null,
     access_key    varchar(255) default ''::varchar,
     secret_key    varchar(255) default ''::varchar,
@@ -1115,7 +1204,7 @@
 comment on column sys_oss_config.is_https       is '鏄惁https锛圷=鏄�,N=鍚︼級';
 comment on column sys_oss_config.region         is '鍩�';
 comment on column sys_oss_config.access_policy  is '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)';
-comment on column sys_oss_config.status         is '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�';
+comment on column sys_oss_config.status         is '鏄惁榛樿锛�0=鏄�,1=鍚︼級';
 comment on column sys_oss_config.ext1           is '鎵╁睍瀛楁';
 comment on column sys_oss_config.create_dept    is '鍒涘缓閮ㄩ棬';
 comment on column sys_oss_config.create_by      is '鍒涘缓鑰�';
@@ -1130,6 +1219,49 @@
 insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi-1250000000',  '', 'cos.ap-beijing.myqcloud.com',         '','N', 'ap-beijing',  '1', '1', '', 103, 1, now(), 1, now(), null);
 insert into sys_oss_config values (5, '000000', 'image',  'ruoyi',            'ruoyi123',        'ruoyi',             'image', '127.0.0.1:9000',                 '','N', '',            '1', '1', '', 103, 1, now(), 1, now(), NULL);
 
+-- ----------------------------
+-- 绯荤粺鎺堟潈琛�
+-- ----------------------------
+drop table if exists sys_client;
+create table sys_client (
+    id                  int8,
+    client_id           varchar(64)   default ''::varchar,
+    client_key          varchar(32)   default ''::varchar,
+    client_secret       varchar(255)  default ''::varchar,
+    grant_type          varchar(255)  default ''::varchar,
+    device_type         varchar(32)   default ''::varchar,
+    active_timeout      int4          default 1800,
+    timeout             int4          default 604800,
+    status              char(1)       default '0'::bpchar,
+    del_flag            char(1)       default '0'::bpchar,
+    create_dept         int8,
+    create_by           int8,
+    create_time         timestamp,
+    update_by           int8,
+    update_time         timestamp,
+    constraint sys_client_pk primary key (id)
+);
+
+comment on table sys_client                         is '绯荤粺鎺堟潈琛�';
+comment on column sys_client.id                     is '涓诲缓';
+comment on column sys_client.client_id              is '瀹㈡埛绔痠d';
+comment on column sys_client.client_key             is '瀹㈡埛绔痥ey';
+comment on column sys_client.client_secret          is '瀹㈡埛绔閽�';
+comment on column sys_client.grant_type             is '鎺堟潈绫诲瀷';
+comment on column sys_client.device_type            is '璁惧绫诲瀷';
+comment on column sys_client.active_timeout         is 'token娲昏穬瓒呮椂鏃堕棿';
+comment on column sys_client.timeout                is 'token鍥哄畾瓒呮椂';
+comment on column sys_client.status                 is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column sys_client.del_flag               is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+comment on column sys_client.create_dept            is '鍒涘缓閮ㄩ棬';
+comment on column sys_client.create_by              is '鍒涘缓鑰�';
+comment on column sys_client.create_time            is '鍒涘缓鏃堕棿';
+comment on column sys_client.update_by              is '鏇存柊鑰�';
+comment on column sys_client.update_time            is '鏇存柊鏃堕棿';
+
+insert into sys_client values (1, 'e5cd7e4891bf95d1d19206ce24a7b32e', 'pc', 'pc123', 'password,social', 'pc', 1800, 604800, 0, 0, 103, 1, now(), 1, now());
+insert into sys_client values (2, '428a8310cd442757ae699df5d894f051', 'app', 'app123', 'password,sms,social', 'app', 1800, 604800, 0, 0, 103, 1, now(), 1, now());
+
 -- 瀛楃涓茶嚜鍔ㄨ浆鏃堕棿 閬垮厤妗嗘灦鏃堕棿鏌ヨ鎶ラ敊闂
 create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$
 select to_timestamp($1, 'yyyy-mm-dd hh24:mi:ss');

--
Gitblit v1.9.3