Commit a2ff100c14930ac77fb69b46875eda9d05f5e527

Authored by YunaiV
1 parent 35b6f9d3

fix:pgsql 的脚本,自增 id 有问题,对应 https://gitee.com/zhijiantianya/yudao-cloud/issues/ID97FH

Showing 1 changed file with 130 additions and 130 deletions
sql/postgresql/ruoyi-vue-pro.sql
@@ -27,6 +27,10 @@ COMMENT ON TABLE dual IS '数据库连接的表'; @@ -27,6 +27,10 @@ COMMENT ON TABLE dual IS '数据库连接的表';
27 INSERT INTO dual VALUES (1); 27 INSERT INTO dual VALUES (1);
28 -- @formatter:on 28 -- @formatter:on
29 29
  30 +DROP SEQUENCE IF EXISTS infra_api_access_log_seq;
  31 +CREATE SEQUENCE infra_api_access_log_seq
  32 + START 1;
  33 +
30 -- ---------------------------- 34 -- ----------------------------
31 -- Table structure for infra_api_access_log 35 -- Table structure for infra_api_access_log
32 -- ---------------------------- 36 -- ----------------------------
@@ -92,8 +96,8 @@ COMMENT ON COLUMN infra_api_access_log.deleted IS '是否删除'; @@ -92,8 +96,8 @@ COMMENT ON COLUMN infra_api_access_log.deleted IS '是否删除';
92 COMMENT ON COLUMN infra_api_access_log.tenant_id IS '租户编号'; 96 COMMENT ON COLUMN infra_api_access_log.tenant_id IS '租户编号';
93 COMMENT ON TABLE infra_api_access_log IS 'API 访问日志表'; 97 COMMENT ON TABLE infra_api_access_log IS 'API 访问日志表';
94 98
95 -DROP SEQUENCE IF EXISTS infra_api_access_log_seq;  
96 -CREATE SEQUENCE infra_api_access_log_seq 99 +DROP SEQUENCE IF EXISTS infra_api_error_log_seq;
  100 +CREATE SEQUENCE infra_api_error_log_seq
97 START 1; 101 START 1;
98 102
99 -- ---------------------------- 103 -- ----------------------------
@@ -165,8 +169,8 @@ COMMENT ON COLUMN infra_api_error_log.deleted IS '是否删除'; @@ -165,8 +169,8 @@ COMMENT ON COLUMN infra_api_error_log.deleted IS '是否删除';
165 COMMENT ON COLUMN infra_api_error_log.tenant_id IS '租户编号'; 169 COMMENT ON COLUMN infra_api_error_log.tenant_id IS '租户编号';
166 COMMENT ON TABLE infra_api_error_log IS '系统异常日志'; 170 COMMENT ON TABLE infra_api_error_log IS '系统异常日志';
167 171
168 -DROP SEQUENCE IF EXISTS infra_api_error_log_seq;  
169 -CREATE SEQUENCE infra_api_error_log_seq 172 +DROP SEQUENCE IF EXISTS infra_codegen_column_seq;
  173 +CREATE SEQUENCE infra_codegen_column_seq
170 START 1; 174 START 1;
171 175
172 -- ---------------------------- 176 -- ----------------------------
@@ -228,8 +232,8 @@ COMMENT ON COLUMN infra_codegen_column.update_time IS '更新时间'; @@ -228,8 +232,8 @@ COMMENT ON COLUMN infra_codegen_column.update_time IS '更新时间';
228 COMMENT ON COLUMN infra_codegen_column.deleted IS '是否删除'; 232 COMMENT ON COLUMN infra_codegen_column.deleted IS '是否删除';
229 COMMENT ON TABLE infra_codegen_column IS '代码生成表字段定义'; 233 COMMENT ON TABLE infra_codegen_column IS '代码生成表字段定义';
230 234
231 -DROP SEQUENCE IF EXISTS infra_codegen_column_seq;  
232 -CREATE SEQUENCE infra_codegen_column_seq 235 +DROP SEQUENCE IF EXISTS infra_codegen_table_seq;
  236 +CREATE SEQUENCE infra_codegen_table_seq
233 START 1; 237 START 1;
234 238
235 -- ---------------------------- 239 -- ----------------------------
@@ -293,8 +297,9 @@ COMMENT ON COLUMN infra_codegen_table.update_time IS '更新时间'; @@ -293,8 +297,9 @@ COMMENT ON COLUMN infra_codegen_table.update_time IS '更新时间';
293 COMMENT ON COLUMN infra_codegen_table.deleted IS '是否删除'; 297 COMMENT ON COLUMN infra_codegen_table.deleted IS '是否删除';
294 COMMENT ON TABLE infra_codegen_table IS '代码生成表定义'; 298 COMMENT ON TABLE infra_codegen_table IS '代码生成表定义';
295 299
296 -DROP SEQUENCE IF EXISTS infra_codegen_table_seq;  
297 -CREATE SEQUENCE infra_codegen_table_seq 300 +
  301 +DROP SEQUENCE IF EXISTS infra_config_seq;
  302 +CREATE SEQUENCE infra_config_seq
298 START 1; 303 START 1;
299 304
300 -- ---------------------------- 305 -- ----------------------------
@@ -352,9 +357,9 @@ INSERT INTO infra_config (id, category, type, name, config_key, value, visible, @@ -352,9 +357,9 @@ INSERT INTO infra_config (id, category, type, name, config_key, value, visible,
352 COMMIT; 357 COMMIT;
353 -- @formatter:on 358 -- @formatter:on
354 359
355 -DROP SEQUENCE IF EXISTS infra_config_seq;  
356 -CREATE SEQUENCE infra_config_seq  
357 - START 14; 360 +DROP SEQUENCE IF EXISTS infra_data_source_config_seq;
  361 +CREATE SEQUENCE infra_data_source_config_seq
  362 + START 1;
358 363
359 -- ---------------------------- 364 -- ----------------------------
360 -- Table structure for infra_data_source_config 365 -- Table structure for infra_data_source_config
@@ -389,8 +394,8 @@ COMMENT ON COLUMN infra_data_source_config.update_time IS '更新时间'; @@ -389,8 +394,8 @@ COMMENT ON COLUMN infra_data_source_config.update_time IS '更新时间';
389 COMMENT ON COLUMN infra_data_source_config.deleted IS '是否删除'; 394 COMMENT ON COLUMN infra_data_source_config.deleted IS '是否删除';
390 COMMENT ON TABLE infra_data_source_config IS '数据源配置表'; 395 COMMENT ON TABLE infra_data_source_config IS '数据源配置表';
391 396
392 -DROP SEQUENCE IF EXISTS infra_data_source_config_seq;  
393 -CREATE SEQUENCE infra_data_source_config_seq 397 +DROP SEQUENCE IF EXISTS infra_file_seq;
  398 +CREATE SEQUENCE infra_file_seq
394 START 1; 399 START 1;
395 400
396 -- ---------------------------- 401 -- ----------------------------
@@ -430,9 +435,9 @@ COMMENT ON COLUMN infra_file.update_time IS '更新时间'; @@ -430,9 +435,9 @@ COMMENT ON COLUMN infra_file.update_time IS '更新时间';
430 COMMENT ON COLUMN infra_file.deleted IS '是否删除'; 435 COMMENT ON COLUMN infra_file.deleted IS '是否删除';
431 COMMENT ON TABLE infra_file IS '文件表'; 436 COMMENT ON TABLE infra_file IS '文件表';
432 437
433 -DROP SEQUENCE IF EXISTS infra_file_seq;  
434 -CREATE SEQUENCE infra_file_seq  
435 - START 1; 438 +DROP SEQUENCE IF EXISTS infra_file_config_seq;
  439 +CREATE SEQUENCE infra_file_config_seq
  440 + START 31;
436 441
437 -- ---------------------------- 442 -- ----------------------------
438 -- Table structure for infra_file_config 443 -- Table structure for infra_file_config
@@ -486,9 +491,9 @@ INSERT INTO infra_file_config (id, name, storage, remark, master, config, creato @@ -486,9 +491,9 @@ INSERT INTO infra_file_config (id, name, storage, remark, master, config, creato
486 COMMIT; 491 COMMIT;
487 -- @formatter:on 492 -- @formatter:on
488 493
489 -DROP SEQUENCE IF EXISTS infra_file_config_seq;  
490 -CREATE SEQUENCE infra_file_config_seq  
491 - START 31; 494 +DROP SEQUENCE IF EXISTS infra_file_content_seq;
  495 +CREATE SEQUENCE infra_file_content_seq
  496 + START 1;
492 497
493 -- ---------------------------- 498 -- ----------------------------
494 -- Table structure for infra_file_content 499 -- Table structure for infra_file_content
@@ -521,8 +526,8 @@ COMMENT ON COLUMN infra_file_content.update_time IS '更新时间'; @@ -521,8 +526,8 @@ COMMENT ON COLUMN infra_file_content.update_time IS '更新时间';
521 COMMENT ON COLUMN infra_file_content.deleted IS '是否删除'; 526 COMMENT ON COLUMN infra_file_content.deleted IS '是否删除';
522 COMMENT ON TABLE infra_file_content IS '文件表'; 527 COMMENT ON TABLE infra_file_content IS '文件表';
523 528
524 -DROP SEQUENCE IF EXISTS infra_file_content_seq;  
525 -CREATE SEQUENCE infra_file_content_seq 529 +DROP SEQUENCE IF EXISTS infra_job_seq;
  530 +CREATE SEQUENCE infra_job_seq
526 START 1; 531 START 1;
527 532
528 -- ---------------------------- 533 -- ----------------------------
@@ -587,9 +592,9 @@ INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expre @@ -587,9 +592,9 @@ INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expre
587 COMMIT; 592 COMMIT;
588 -- @formatter:on 593 -- @formatter:on
589 594
590 -DROP SEQUENCE IF EXISTS infra_job_seq;  
591 -CREATE SEQUENCE infra_job_seq  
592 - START 36; 595 +DROP SEQUENCE IF EXISTS infra_job_log_seq;
  596 +CREATE SEQUENCE infra_job_log_seq
  597 + START 1;
593 598
594 -- ---------------------------- 599 -- ----------------------------
595 -- Table structure for infra_job_log 600 -- Table structure for infra_job_log
@@ -634,8 +639,8 @@ COMMENT ON COLUMN infra_job_log.update_time IS '更新时间'; @@ -634,8 +639,8 @@ COMMENT ON COLUMN infra_job_log.update_time IS '更新时间';
634 COMMENT ON COLUMN infra_job_log.deleted IS '是否删除'; 639 COMMENT ON COLUMN infra_job_log.deleted IS '是否删除';
635 COMMENT ON TABLE infra_job_log IS '定时任务日志表'; 640 COMMENT ON TABLE infra_job_log IS '定时任务日志表';
636 641
637 -DROP SEQUENCE IF EXISTS infra_job_log_seq;  
638 -CREATE SEQUENCE infra_job_log_seq 642 +DROP SEQUENCE IF EXISTS system_dept_seq;
  643 +CREATE SEQUENCE system_dept_seq
639 START 1; 644 START 1;
640 645
641 -- ---------------------------- 646 -- ----------------------------
@@ -701,9 +706,9 @@ INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email @@ -701,9 +706,9 @@ INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email
701 COMMIT; 706 COMMIT;
702 -- @formatter:on 707 -- @formatter:on
703 708
704 -DROP SEQUENCE IF EXISTS system_dept_seq;  
705 -CREATE SEQUENCE system_dept_seq  
706 - START 114; 709 +DROP SEQUENCE IF EXISTS system_dict_data_seq;
  710 +CREATE SEQUENCE system_dict_data_seq
  711 + START 1;
707 712
708 -- ---------------------------- 713 -- ----------------------------
709 -- Table structure for system_dict_data 714 -- Table structure for system_dict_data
@@ -1354,13 +1359,12 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t @@ -1354,13 +1359,12 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t
1354 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3000, 16, '百川智能', 'BaiChuan', 'ai_platform', 0, '', '', '', '1', '2025-03-23 12:15:46', '1', '2025-03-23 12:15:46', '0'); 1359 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3000, 16, '百川智能', 'BaiChuan', 'ai_platform', 0, '', '', '', '1', '2025-03-23 12:15:46', '1', '2025-03-23 12:15:46', '0');
1355 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3001, 50, 'Vben5.0 Ant Design Schema 模版', '40', 'infra_codegen_front_type', 0, '', '', NULL, '1', '2025-04-23 21:47:47', '1', '2025-05-02 12:01:15', '0'); 1360 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3001, 50, 'Vben5.0 Ant Design Schema 模版', '40', 'infra_codegen_front_type', 0, '', '', NULL, '1', '2025-04-23 21:47:47', '1', '2025-05-02 12:01:15', '0');
1356 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3002, 6, '支付宝余额', '6', 'brokerage_withdraw_type', 0, '', '', 'API 打款', '1', '2025-05-10 08:24:49', '1', '2025-05-10 08:24:49', '0'); 1361 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3002, 6, '支付宝余额', '6', 'brokerage_withdraw_type', 0, '', '', 'API 打款', '1', '2025-05-10 08:24:49', '1', '2025-05-10 08:24:49', '0');
1357 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3035, 40, '支付宝小程序', '40', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:38', '1', '2023-11-04 13:07:16', '0');  
1358 COMMIT; 1362 COMMIT;
1359 -- @formatter:on 1363 -- @formatter:on
1360 1364
1361 -DROP SEQUENCE IF EXISTS system_dict_data_seq;  
1362 -CREATE SEQUENCE system_dict_data_seq  
1363 - START 3003; 1365 +DROP SEQUENCE IF EXISTS system_dict_type_seq;
  1366 +CREATE SEQUENCE system_dict_type_seq
  1367 + START 1;
1364 1368
1365 -- ---------------------------- 1369 -- ----------------------------
1366 -- Table structure for system_dict_type 1370 -- Table structure for system_dict_type
@@ -1512,9 +1516,9 @@ INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_ti @@ -1512,9 +1516,9 @@ INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_ti
1512 COMMIT; 1516 COMMIT;
1513 -- @formatter:on 1517 -- @formatter:on
1514 1518
1515 -DROP SEQUENCE IF EXISTS system_dict_type_seq;  
1516 -CREATE SEQUENCE system_dict_type_seq  
1517 - START 1014; 1519 +DROP SEQUENCE IF EXISTS system_login_log_seq;
  1520 +CREATE SEQUENCE system_login_log_seq
  1521 + START 1;
1518 1522
1519 -- ---------------------------- 1523 -- ----------------------------
1520 -- Table structure for system_login_log 1524 -- Table structure for system_login_log
@@ -1559,8 +1563,8 @@ COMMENT ON COLUMN system_login_log.deleted IS '是否删除'; @@ -1559,8 +1563,8 @@ COMMENT ON COLUMN system_login_log.deleted IS '是否删除';
1559 COMMENT ON COLUMN system_login_log.tenant_id IS '租户编号'; 1563 COMMENT ON COLUMN system_login_log.tenant_id IS '租户编号';
1560 COMMENT ON TABLE system_login_log IS '系统访问记录'; 1564 COMMENT ON TABLE system_login_log IS '系统访问记录';
1561 1565
1562 -DROP SEQUENCE IF EXISTS system_login_log_seq;  
1563 -CREATE SEQUENCE system_login_log_seq 1566 +DROP SEQUENCE IF EXISTS system_mail_account_seq;
  1567 +CREATE SEQUENCE system_mail_account_seq
1564 START 1; 1568 START 1;
1565 1569
1566 -- ---------------------------- 1570 -- ----------------------------
@@ -1614,9 +1618,9 @@ INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_e @@ -1614,9 +1618,9 @@ INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_e
1614 COMMIT; 1618 COMMIT;
1615 -- @formatter:on 1619 -- @formatter:on
1616 1620
1617 -DROP SEQUENCE IF EXISTS system_mail_account_seq;  
1618 -CREATE SEQUENCE system_mail_account_seq  
1619 - START 5; 1621 +DROP SEQUENCE IF EXISTS system_mail_log_seq;
  1622 +CREATE SEQUENCE system_mail_log_seq
  1623 + START 1;
1620 1624
1621 -- ---------------------------- 1625 -- ----------------------------
1622 -- Table structure for system_mail_log 1626 -- Table structure for system_mail_log
@@ -1673,8 +1677,8 @@ COMMENT ON COLUMN system_mail_log.update_time IS '更新时间'; @@ -1673,8 +1677,8 @@ COMMENT ON COLUMN system_mail_log.update_time IS '更新时间';
1673 COMMENT ON COLUMN system_mail_log.deleted IS '是否删除'; 1677 COMMENT ON COLUMN system_mail_log.deleted IS '是否删除';
1674 COMMENT ON TABLE system_mail_log IS '邮件日志表'; 1678 COMMENT ON TABLE system_mail_log IS '邮件日志表';
1675 1679
1676 -DROP SEQUENCE IF EXISTS system_mail_log_seq;  
1677 -CREATE SEQUENCE system_mail_log_seq 1680 +DROP SEQUENCE IF EXISTS system_mail_template_seq;
  1681 +CREATE SEQUENCE system_mail_template_seq
1678 START 1; 1682 START 1;
1679 1683
1680 -- ---------------------------- 1684 -- ----------------------------
@@ -1731,9 +1735,9 @@ INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, c @@ -1731,9 +1735,9 @@ INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, c
1731 COMMIT; 1735 COMMIT;
1732 -- @formatter:on 1736 -- @formatter:on
1733 1737
1734 -DROP SEQUENCE IF EXISTS system_mail_template_seq;  
1735 -CREATE SEQUENCE system_mail_template_seq  
1736 - START 16; 1738 +DROP SEQUENCE IF EXISTS system_menu_seq;
  1739 +CREATE SEQUENCE system_menu_seq
  1740 + START 1;
1737 1741
1738 -- ---------------------------- 1742 -- ----------------------------
1739 -- Table structure for system_menu 1743 -- Table structure for system_menu
@@ -2705,9 +2709,9 @@ INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon @@ -2705,9 +2709,9 @@ INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon
2705 COMMIT; 2709 COMMIT;
2706 -- @formatter:on 2710 -- @formatter:on
2707 2711
2708 -DROP SEQUENCE IF EXISTS system_menu_seq;  
2709 -CREATE SEQUENCE system_menu_seq  
2710 - START 5013; 2712 +DROP SEQUENCE IF EXISTS system_notice_seq;
  2713 +CREATE SEQUENCE system_notice_seq
  2714 + START 1;
2711 2715
2712 -- ---------------------------- 2716 -- ----------------------------
2713 -- Table structure for system_notice 2717 -- Table structure for system_notice
@@ -2755,9 +2759,9 @@ INSERT INTO system_notice (id, title, content, type, status, creator, create_tim @@ -2755,9 +2759,9 @@ INSERT INTO system_notice (id, title, content, type, status, creator, create_tim
2755 COMMIT; 2759 COMMIT;
2756 -- @formatter:on 2760 -- @formatter:on
2757 2761
2758 -DROP SEQUENCE IF EXISTS system_notice_seq;  
2759 -CREATE SEQUENCE system_notice_seq  
2760 - START 5; 2762 +DROP SEQUENCE IF EXISTS system_notify_message_seq;
  2763 +CREATE SEQUENCE system_notify_message_seq
  2764 + START 1;
2761 2765
2762 -- ---------------------------- 2766 -- ----------------------------
2763 -- Table structure for system_notify_message 2767 -- Table structure for system_notify_message
@@ -2823,9 +2827,9 @@ INSERT INTO system_notify_message (id, user_id, user_type, template_id, template @@ -2823,9 +2827,9 @@ INSERT INTO system_notify_message (id, user_id, user_type, template_id, template
2823 COMMIT; 2827 COMMIT;
2824 -- @formatter:on 2828 -- @formatter:on
2825 2829
2826 -DROP SEQUENCE IF EXISTS system_notify_message_seq;  
2827 -CREATE SEQUENCE system_notify_message_seq  
2828 - START 11; 2830 +DROP SEQUENCE IF EXISTS system_notify_template_seq;
  2831 +CREATE SEQUENCE system_notify_template_seq
  2832 + START 1;
2829 2833
2830 -- ---------------------------- 2834 -- ----------------------------
2831 -- Table structure for system_notify_template 2835 -- Table structure for system_notify_template
@@ -2868,8 +2872,8 @@ COMMENT ON COLUMN system_notify_template.update_time IS '更新时间'; @@ -2868,8 +2872,8 @@ COMMENT ON COLUMN system_notify_template.update_time IS '更新时间';
2868 COMMENT ON COLUMN system_notify_template.deleted IS '是否删除'; 2872 COMMENT ON COLUMN system_notify_template.deleted IS '是否删除';
2869 COMMENT ON TABLE system_notify_template IS '站内信模板表'; 2873 COMMENT ON TABLE system_notify_template IS '站内信模板表';
2870 2874
2871 -DROP SEQUENCE IF EXISTS system_notify_template_seq;  
2872 -CREATE SEQUENCE system_notify_template_seq 2875 +DROP SEQUENCE IF EXISTS system_oauth2_access_token_seq;
  2876 +CREATE SEQUENCE system_oauth2_access_token_seq
2873 START 1; 2877 START 1;
2874 2878
2875 -- ---------------------------- 2879 -- ----------------------------
@@ -2918,8 +2922,8 @@ COMMENT ON COLUMN system_oauth2_access_token.deleted IS '是否删除'; @@ -2918,8 +2922,8 @@ COMMENT ON COLUMN system_oauth2_access_token.deleted IS '是否删除';
2918 COMMENT ON COLUMN system_oauth2_access_token.tenant_id IS '租户编号'; 2922 COMMENT ON COLUMN system_oauth2_access_token.tenant_id IS '租户编号';
2919 COMMENT ON TABLE system_oauth2_access_token IS 'OAuth2 访问令牌'; 2923 COMMENT ON TABLE system_oauth2_access_token IS 'OAuth2 访问令牌';
2920 2924
2921 -DROP SEQUENCE IF EXISTS system_oauth2_access_token_seq;  
2922 -CREATE SEQUENCE system_oauth2_access_token_seq 2925 +DROP SEQUENCE IF EXISTS system_oauth2_approve_seq;
  2926 +CREATE SEQUENCE system_oauth2_approve_seq
2923 START 1; 2927 START 1;
2924 2928
2925 -- ---------------------------- 2929 -- ----------------------------
@@ -2961,8 +2965,8 @@ COMMENT ON COLUMN system_oauth2_approve.deleted IS '是否删除'; @@ -2961,8 +2965,8 @@ COMMENT ON COLUMN system_oauth2_approve.deleted IS '是否删除';
2961 COMMENT ON COLUMN system_oauth2_approve.tenant_id IS '租户编号'; 2965 COMMENT ON COLUMN system_oauth2_approve.tenant_id IS '租户编号';
2962 COMMENT ON TABLE system_oauth2_approve IS 'OAuth2 批准表'; 2966 COMMENT ON TABLE system_oauth2_approve IS 'OAuth2 批准表';
2963 2967
2964 -DROP SEQUENCE IF EXISTS system_oauth2_approve_seq;  
2965 -CREATE SEQUENCE system_oauth2_approve_seq 2968 +DROP SEQUENCE IF EXISTS system_oauth2_client_seq;
  2969 +CREATE SEQUENCE system_oauth2_client_seq
2966 START 1; 2970 START 1;
2967 2971
2968 -- ---------------------------- 2972 -- ----------------------------
@@ -3032,9 +3036,9 @@ INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description @@ -3032,9 +3036,9 @@ INSERT INTO system_oauth2_client (id, client_id, secret, name, logo, description
3032 COMMIT; 3036 COMMIT;
3033 -- @formatter:on 3037 -- @formatter:on
3034 3038
3035 -DROP SEQUENCE IF EXISTS system_oauth2_client_seq;  
3036 -CREATE SEQUENCE system_oauth2_client_seq  
3037 - START 43; 3039 +DROP SEQUENCE IF EXISTS system_oauth2_code_seq;
  3040 +CREATE SEQUENCE system_oauth2_code_seq
  3041 + START 1;
3038 3042
3039 -- ---------------------------- 3043 -- ----------------------------
3040 -- Table structure for system_oauth2_code 3044 -- Table structure for system_oauth2_code
@@ -3079,8 +3083,8 @@ COMMENT ON COLUMN system_oauth2_code.deleted IS '是否删除'; @@ -3079,8 +3083,8 @@ COMMENT ON COLUMN system_oauth2_code.deleted IS '是否删除';
3079 COMMENT ON COLUMN system_oauth2_code.tenant_id IS '租户编号'; 3083 COMMENT ON COLUMN system_oauth2_code.tenant_id IS '租户编号';
3080 COMMENT ON TABLE system_oauth2_code IS 'OAuth2 授权码表'; 3084 COMMENT ON TABLE system_oauth2_code IS 'OAuth2 授权码表';
3081 3085
3082 -DROP SEQUENCE IF EXISTS system_oauth2_code_seq;  
3083 -CREATE SEQUENCE system_oauth2_code_seq 3086 +DROP SEQUENCE IF EXISTS system_oauth2_refresh_token_seq;
  3087 +CREATE SEQUENCE system_oauth2_refresh_token_seq
3084 START 1; 3088 START 1;
3085 3089
3086 -- ---------------------------- 3090 -- ----------------------------
@@ -3122,8 +3126,8 @@ COMMENT ON COLUMN system_oauth2_refresh_token.deleted IS '是否删除'; @@ -3122,8 +3126,8 @@ COMMENT ON COLUMN system_oauth2_refresh_token.deleted IS '是否删除';
3122 COMMENT ON COLUMN system_oauth2_refresh_token.tenant_id IS '租户编号'; 3126 COMMENT ON COLUMN system_oauth2_refresh_token.tenant_id IS '租户编号';
3123 COMMENT ON TABLE system_oauth2_refresh_token IS 'OAuth2 刷新令牌'; 3127 COMMENT ON TABLE system_oauth2_refresh_token IS 'OAuth2 刷新令牌';
3124 3128
3125 -DROP SEQUENCE IF EXISTS system_oauth2_refresh_token_seq;  
3126 -CREATE SEQUENCE system_oauth2_refresh_token_seq 3129 +DROP SEQUENCE IF EXISTS system_operate_log_seq;
  3130 +CREATE SEQUENCE system_operate_log_seq
3127 START 1; 3131 START 1;
3128 3132
3129 -- ---------------------------- 3133 -- ----------------------------
@@ -3179,8 +3183,8 @@ COMMENT ON COLUMN system_operate_log.deleted IS '是否删除'; @@ -3179,8 +3183,8 @@ COMMENT ON COLUMN system_operate_log.deleted IS '是否删除';
3179 COMMENT ON COLUMN system_operate_log.tenant_id IS '租户编号'; 3183 COMMENT ON COLUMN system_operate_log.tenant_id IS '租户编号';
3180 COMMENT ON TABLE system_operate_log IS '操作日志记录 V2 版本'; 3184 COMMENT ON TABLE system_operate_log IS '操作日志记录 V2 版本';
3181 3185
3182 -DROP SEQUENCE IF EXISTS system_operate_log_seq;  
3183 -CREATE SEQUENCE system_operate_log_seq 3186 +DROP SEQUENCE IF EXISTS system_post_seq;
  3187 +CREATE SEQUENCE system_post_seq
3184 START 1; 3188 START 1;
3185 3189
3186 -- ---------------------------- 3190 -- ----------------------------
@@ -3232,9 +3236,9 @@ INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_t @@ -3232,9 +3236,9 @@ INSERT INTO system_post (id, code, name, sort, status, remark, creator, create_t
3232 COMMIT; 3236 COMMIT;
3233 -- @formatter:on 3237 -- @formatter:on
3234 3238
3235 -DROP SEQUENCE IF EXISTS system_post_seq;  
3236 -CREATE SEQUENCE system_post_seq  
3237 - START 6; 3239 +DROP SEQUENCE IF EXISTS system_role_seq;
  3240 +CREATE SEQUENCE system_role_seq
  3241 + START 1;
3238 3242
3239 -- ---------------------------- 3243 -- ----------------------------
3240 -- Table structure for system_role 3244 -- Table structure for system_role
@@ -3295,9 +3299,9 @@ INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, @@ -3295,9 +3299,9 @@ INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids,
3295 COMMIT; 3299 COMMIT;
3296 -- @formatter:on 3300 -- @formatter:on
3297 3301
3298 -DROP SEQUENCE IF EXISTS system_role_seq;  
3299 -CREATE SEQUENCE system_role_seq  
3300 - START 159; 3302 +DROP SEQUENCE IF EXISTS system_role_menu_seq;
  3303 +CREATE SEQUENCE system_role_menu_seq
  3304 + START 1;
3301 3305
3302 -- ---------------------------- 3306 -- ----------------------------
3303 -- Table structure for system_role_menu 3307 -- Table structure for system_role_menu
@@ -4201,9 +4205,9 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update @@ -4201,9 +4205,9 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update
4201 COMMIT; 4205 COMMIT;
4202 -- @formatter:on 4206 -- @formatter:on
4203 4207
4204 -DROP SEQUENCE IF EXISTS system_role_menu_seq;  
4205 -CREATE SEQUENCE system_role_menu_seq  
4206 - START 6139; 4208 +DROP SEQUENCE IF EXISTS system_sms_channel_seq;
  4209 +CREATE SEQUENCE system_sms_channel_seq
  4210 + START 1;
4207 4211
4208 -- ---------------------------- 4212 -- ----------------------------
4209 -- Table structure for system_sms_channel 4213 -- Table structure for system_sms_channel
@@ -4255,9 +4259,9 @@ INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, ap @@ -4255,9 +4259,9 @@ INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, ap
4255 COMMIT; 4259 COMMIT;
4256 -- @formatter:on 4260 -- @formatter:on
4257 4261
4258 -DROP SEQUENCE IF EXISTS system_sms_channel_seq;  
4259 -CREATE SEQUENCE system_sms_channel_seq  
4260 - START 8; 4262 +DROP SEQUENCE IF EXISTS system_sms_code_seq;
  4263 +CREATE SEQUENCE system_sms_code_seq
  4264 + START 1;
4261 4265
4262 -- ---------------------------- 4266 -- ----------------------------
4263 -- Table structure for system_sms_code 4267 -- Table structure for system_sms_code
@@ -4304,8 +4308,8 @@ COMMENT ON COLUMN system_sms_code.deleted IS '是否删除'; @@ -4304,8 +4308,8 @@ COMMENT ON COLUMN system_sms_code.deleted IS '是否删除';
4304 COMMENT ON COLUMN system_sms_code.tenant_id IS '租户编号'; 4308 COMMENT ON COLUMN system_sms_code.tenant_id IS '租户编号';
4305 COMMENT ON TABLE system_sms_code IS '手机验证码'; 4309 COMMENT ON TABLE system_sms_code IS '手机验证码';
4306 4310
4307 -DROP SEQUENCE IF EXISTS system_sms_code_seq;  
4308 -CREATE SEQUENCE system_sms_code_seq 4311 +DROP SEQUENCE IF EXISTS system_sms_log_seq;
  4312 +CREATE SEQUENCE system_sms_log_seq
4309 START 1; 4313 START 1;
4310 4314
4311 -- ---------------------------- 4315 -- ----------------------------
@@ -4375,8 +4379,8 @@ COMMENT ON COLUMN system_sms_log.update_time IS '更新时间'; @@ -4375,8 +4379,8 @@ COMMENT ON COLUMN system_sms_log.update_time IS '更新时间';
4375 COMMENT ON COLUMN system_sms_log.deleted IS '是否删除'; 4379 COMMENT ON COLUMN system_sms_log.deleted IS '是否删除';
4376 COMMENT ON TABLE system_sms_log IS '短信日志'; 4380 COMMENT ON TABLE system_sms_log IS '短信日志';
4377 4381
4378 -DROP SEQUENCE IF EXISTS system_sms_log_seq;  
4379 -CREATE SEQUENCE system_sms_log_seq 4382 +DROP SEQUENCE IF EXISTS system_sms_template_seq;
  4383 +CREATE SEQUENCE system_sms_template_seq
4380 START 1; 4384 START 1;
4381 4385
4382 -- ---------------------------- 4386 -- ----------------------------
@@ -4447,9 +4451,9 @@ INSERT INTO system_sms_template (id, type, status, code, name, content, params, @@ -4447,9 +4451,9 @@ INSERT INTO system_sms_template (id, type, status, code, name, content, params,
4447 COMMIT; 4451 COMMIT;
4448 -- @formatter:on 4452 -- @formatter:on
4449 4453
4450 -DROP SEQUENCE IF EXISTS system_sms_template_seq;  
4451 -CREATE SEQUENCE system_sms_template_seq  
4452 - START 20; 4454 +DROP SEQUENCE IF EXISTS system_social_client_seq;
  4455 +CREATE SEQUENCE system_social_client_seq
  4456 + START 1;
4453 4457
4454 -- ---------------------------- 4458 -- ----------------------------
4455 -- Table structure for system_social_client 4459 -- Table structure for system_social_client
@@ -4462,8 +4466,8 @@ CREATE TABLE system_social_client @@ -4462,8 +4466,8 @@ CREATE TABLE system_social_client
4462 social_type int2 NOT NULL, 4466 social_type int2 NOT NULL,
4463 user_type int2 NOT NULL, 4467 user_type int2 NOT NULL,
4464 client_id varchar(255) NOT NULL, 4468 client_id varchar(255) NOT NULL,
4465 - client_secret varchar(2048) NOT NULL,  
4466 - public_key varchar(2048) NULL DEFAULT NULL, 4469 + client_secret varchar(255) NOT NULL,
  4470 + public_key varchar(255) NULL DEFAULT NULL,
4467 agent_id varchar(255) NULL DEFAULT NULL, 4471 agent_id varchar(255) NULL DEFAULT NULL,
4468 status int2 NOT NULL, 4472 status int2 NOT NULL,
4469 creator varchar(64) NULL DEFAULT '', 4473 creator varchar(64) NULL DEFAULT '',
@@ -4483,7 +4487,7 @@ COMMENT ON COLUMN system_social_client.social_type IS '社交平台的类型'; @@ -4483,7 +4487,7 @@ COMMENT ON COLUMN system_social_client.social_type IS '社交平台的类型';
4483 COMMENT ON COLUMN system_social_client.user_type IS '用户类型'; 4487 COMMENT ON COLUMN system_social_client.user_type IS '用户类型';
4484 COMMENT ON COLUMN system_social_client.client_id IS '客户端编号'; 4488 COMMENT ON COLUMN system_social_client.client_id IS '客户端编号';
4485 COMMENT ON COLUMN system_social_client.client_secret IS '客户端密钥'; 4489 COMMENT ON COLUMN system_social_client.client_secret IS '客户端密钥';
4486 -COMMENT ON COLUMN system_social_client.public_key IS 'publicKey公钥'; 4490 +COMMENT ON COLUMN system_social_client.public_key IS 'publicKey 公钥';
4487 COMMENT ON COLUMN system_social_client.agent_id IS '代理编号'; 4491 COMMENT ON COLUMN system_social_client.agent_id IS '代理编号';
4488 COMMENT ON COLUMN system_social_client.status IS '状态'; 4492 COMMENT ON COLUMN system_social_client.status IS '状态';
4489 COMMENT ON COLUMN system_social_client.creator IS '创建者'; 4493 COMMENT ON COLUMN system_social_client.creator IS '创建者';
@@ -4507,9 +4511,9 @@ INSERT INTO system_social_client (id, name, social_type, user_type, client_id, c @@ -4507,9 +4511,9 @@ INSERT INTO system_social_client (id, name, social_type, user_type, client_id, c
4507 COMMIT; 4511 COMMIT;
4508 -- @formatter:on 4512 -- @formatter:on
4509 4513
4510 -DROP SEQUENCE IF EXISTS system_social_client_seq;  
4511 -CREATE SEQUENCE system_social_client_seq  
4512 - START 45; 4514 +DROP SEQUENCE IF EXISTS system_social_user_seq;
  4515 +CREATE SEQUENCE system_social_user_seq
  4516 + START 1;
4513 4517
4514 -- ---------------------------- 4518 -- ----------------------------
4515 -- Table structure for system_social_user 4519 -- Table structure for system_social_user
@@ -4556,8 +4560,8 @@ COMMENT ON COLUMN system_social_user.deleted IS '是否删除'; @@ -4556,8 +4560,8 @@ COMMENT ON COLUMN system_social_user.deleted IS '是否删除';
4556 COMMENT ON COLUMN system_social_user.tenant_id IS '租户编号'; 4560 COMMENT ON COLUMN system_social_user.tenant_id IS '租户编号';
4557 COMMENT ON TABLE system_social_user IS '社交用户表'; 4561 COMMENT ON TABLE system_social_user IS '社交用户表';
4558 4562
4559 -DROP SEQUENCE IF EXISTS system_social_user_seq;  
4560 -CREATE SEQUENCE system_social_user_seq 4563 +DROP SEQUENCE IF EXISTS system_social_user_bind_seq;
  4564 +CREATE SEQUENCE system_social_user_bind_seq
4561 START 1; 4565 START 1;
4562 4566
4563 -- ---------------------------- 4567 -- ----------------------------
@@ -4595,8 +4599,8 @@ COMMENT ON COLUMN system_social_user_bind.deleted IS '是否删除'; @@ -4595,8 +4599,8 @@ COMMENT ON COLUMN system_social_user_bind.deleted IS '是否删除';
4595 COMMENT ON COLUMN system_social_user_bind.tenant_id IS '租户编号'; 4599 COMMENT ON COLUMN system_social_user_bind.tenant_id IS '租户编号';
4596 COMMENT ON TABLE system_social_user_bind IS '社交绑定表'; 4600 COMMENT ON TABLE system_social_user_bind IS '社交绑定表';
4597 4601
4598 -DROP SEQUENCE IF EXISTS system_social_user_bind_seq;  
4599 -CREATE SEQUENCE system_social_user_bind_seq 4602 +DROP SEQUENCE IF EXISTS system_tenant_seq;
  4603 +CREATE SEQUENCE system_tenant_seq
4600 START 1; 4604 START 1;
4601 4605
4602 -- ---------------------------- 4606 -- ----------------------------
@@ -4653,9 +4657,9 @@ INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobi @@ -4653,9 +4657,9 @@ INSERT INTO system_tenant (id, name, contact_user_id, contact_name, contact_mobi
4653 COMMIT; 4657 COMMIT;
4654 -- @formatter:on 4658 -- @formatter:on
4655 4659
4656 -DROP SEQUENCE IF EXISTS system_tenant_seq;  
4657 -CREATE SEQUENCE system_tenant_seq  
4658 - START 123; 4660 +DROP SEQUENCE IF EXISTS system_tenant_package_seq;
  4661 +CREATE SEQUENCE system_tenant_package_seq
  4662 + START 1;
4659 4663
4660 -- ---------------------------- 4664 -- ----------------------------
4661 -- Table structure for system_tenant_package 4665 -- Table structure for system_tenant_package
@@ -4700,9 +4704,9 @@ INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator, @@ -4700,9 +4704,9 @@ INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator,
4700 COMMIT; 4704 COMMIT;
4701 -- @formatter:on 4705 -- @formatter:on
4702 4706
4703 -DROP SEQUENCE IF EXISTS system_tenant_package_seq;  
4704 -CREATE SEQUENCE system_tenant_package_seq  
4705 - START 113; 4707 +DROP SEQUENCE IF EXISTS system_user_post_seq;
  4708 +CREATE SEQUENCE system_user_post_seq
  4709 + START 1;
4706 4710
4707 -- ---------------------------- 4711 -- ----------------------------
4708 -- Table structure for system_user_post 4712 -- Table structure for system_user_post
@@ -4752,9 +4756,9 @@ INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, update @@ -4752,9 +4756,9 @@ INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, update
4752 COMMIT; 4756 COMMIT;
4753 -- @formatter:on 4757 -- @formatter:on
4754 4758
4755 -DROP SEQUENCE IF EXISTS system_user_post_seq;  
4756 -CREATE SEQUENCE system_user_post_seq  
4757 - START 126; 4759 +DROP SEQUENCE IF EXISTS system_user_role_seq;
  4760 +CREATE SEQUENCE system_user_role_seq
  4761 + START 1;
4758 4762
4759 -- ---------------------------- 4763 -- ----------------------------
4760 -- Table structure for system_user_role 4764 -- Table structure for system_user_role
@@ -4812,9 +4816,9 @@ INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, update @@ -4812,9 +4816,9 @@ INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, update
4812 COMMIT; 4816 COMMIT;
4813 -- @formatter:on 4817 -- @formatter:on
4814 4818
4815 -DROP SEQUENCE IF EXISTS system_user_role_seq;  
4816 -CREATE SEQUENCE system_user_role_seq  
4817 - START 49; 4819 +DROP SEQUENCE IF EXISTS system_users_seq;
  4820 +CREATE SEQUENCE system_users_seq
  4821 + START 1;
4818 4822
4819 -- ---------------------------- 4823 -- ----------------------------
4820 -- Table structure for system_users 4824 -- Table structure for system_users
@@ -4895,9 +4899,9 @@ INSERT INTO system_users (id, username, password, nickname, remark, dept_id, pos @@ -4895,9 +4899,9 @@ INSERT INTO system_users (id, username, password, nickname, remark, dept_id, pos
4895 COMMIT; 4899 COMMIT;
4896 -- @formatter:on 4900 -- @formatter:on
4897 4901
4898 -DROP SEQUENCE IF EXISTS system_users_seq;  
4899 -CREATE SEQUENCE system_users_seq  
4900 - START 142; 4902 +DROP SEQUENCE IF EXISTS yudao_demo01_contact_seq;
  4903 +CREATE SEQUENCE yudao_demo01_contact_seq
  4904 + START 1;
4901 4905
4902 -- ---------------------------- 4906 -- ----------------------------
4903 -- Table structure for yudao_demo01_contact 4907 -- Table structure for yudao_demo01_contact
@@ -4945,9 +4949,9 @@ INSERT INTO yudao_demo01_contact (id, name, sex, birthday, description, avatar, @@ -4945,9 +4949,9 @@ INSERT INTO yudao_demo01_contact (id, name, sex, birthday, description, avatar,
4945 COMMIT; 4949 COMMIT;
4946 -- @formatter:on 4950 -- @formatter:on
4947 4951
4948 -DROP SEQUENCE IF EXISTS yudao_demo01_contact_seq;  
4949 -CREATE SEQUENCE yudao_demo01_contact_seq  
4950 - START 2; 4952 +DROP SEQUENCE IF EXISTS yudao_demo02_category_seq;
  4953 +CREATE SEQUENCE yudao_demo02_category_seq
  4954 + START 1;
4951 4955
4952 -- ---------------------------- 4956 -- ----------------------------
4953 -- Table structure for yudao_demo02_category 4957 -- Table structure for yudao_demo02_category
@@ -4994,9 +4998,9 @@ INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, up @@ -4994,9 +4998,9 @@ INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, up
4994 COMMIT; 4998 COMMIT;
4995 -- @formatter:on 4999 -- @formatter:on
4996 5000
4997 -DROP SEQUENCE IF EXISTS yudao_demo02_category_seq;  
4998 -CREATE SEQUENCE yudao_demo02_category_seq  
4999 - START 7; 5001 +DROP SEQUENCE IF EXISTS yudao_demo03_course_seq;
  5002 +CREATE SEQUENCE yudao_demo03_course_seq
  5003 + START 1;
5000 5004
5001 -- ---------------------------- 5005 -- ----------------------------
5002 -- Table structure for yudao_demo03_course 5006 -- Table structure for yudao_demo03_course
@@ -5056,9 +5060,9 @@ INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_ti @@ -5056,9 +5060,9 @@ INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_ti
5056 COMMIT; 5060 COMMIT;
5057 -- @formatter:on 5061 -- @formatter:on
5058 5062
5059 -DROP SEQUENCE IF EXISTS yudao_demo03_course_seq;  
5060 -CREATE SEQUENCE yudao_demo03_course_seq  
5061 - START 21; 5063 +DROP SEQUENCE IF EXISTS yudao_demo03_grade_seq;
  5064 +CREATE SEQUENCE yudao_demo03_grade_seq
  5065 + START 1;
5062 5066
5063 -- ---------------------------- 5067 -- ----------------------------
5064 -- Table structure for yudao_demo03_grade 5068 -- Table structure for yudao_demo03_grade
@@ -5104,9 +5108,9 @@ INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_t @@ -5104,9 +5108,9 @@ INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_t
5104 COMMIT; 5108 COMMIT;
5105 -- @formatter:on 5109 -- @formatter:on
5106 5110
5107 -DROP SEQUENCE IF EXISTS yudao_demo03_grade_seq;  
5108 -CREATE SEQUENCE yudao_demo03_grade_seq  
5109 - START 10; 5111 +DROP SEQUENCE IF EXISTS yudao_demo03_student_seq;
  5112 +CREATE SEQUENCE yudao_demo03_student_seq
  5113 + START 1;
5110 5114
5111 -- ---------------------------- 5115 -- ----------------------------
5112 -- Table structure for yudao_demo03_student 5116 -- Table structure for yudao_demo03_student
@@ -5154,7 +5158,3 @@ INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, @@ -5154,7 +5158,3 @@ INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator,
5154 COMMIT; 5158 COMMIT;
5155 -- @formatter:on 5159 -- @formatter:on
5156 5160
5157 -DROP SEQUENCE IF EXISTS yudao_demo03_student_seq;  
5158 -CREATE SEQUENCE yudao_demo03_student_seq  
5159 - START 10;  
5160 -