疯狂的狮子Li
2024-04-02 0a319b31c85645ea565f519fac4019ec21929258
update 优化 移除删表语句 用户自行处理
已修改1个文件
23 ■■■■■ 文件已修改
script/sql/ry_vue_5.X.sql 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
script/sql/ry_vue_5.X.sql
@@ -1,7 +1,6 @@
-- ----------------------------
-- 第三方平台授权表
-- ----------------------------
drop table if exists sys_social;
create table sys_social
(
    id                 bigint           not null        comment '主键',
@@ -40,7 +39,6 @@
-- ----------------------------
-- 租户表
-- ----------------------------
drop table if exists sys_tenant;
create table sys_tenant
(
    id                bigint(20)    not null        comment 'id',
@@ -77,7 +75,6 @@
-- ----------------------------
-- 租户套餐表
-- ----------------------------
drop table if exists sys_tenant_package;
create table sys_tenant_package (
    package_id              bigint(20)     not null    comment '租户套餐id',
    package_name            varchar(20)                comment '套餐名称',
@@ -98,7 +95,6 @@
-- ----------------------------
-- 1、部门表
-- ----------------------------
drop table if exists sys_dept;
create table sys_dept (
    dept_id           bigint(20)      not null                   comment '部门id',
    tenant_id         varchar(20)     default '000000'           comment '租户编号',
@@ -139,7 +135,6 @@
-- ----------------------------
-- 2、用户信息表
-- ----------------------------
drop table if exists sys_user;
create table sys_user (
    user_id           bigint(20)      not null                   comment '用户ID',
    tenant_id         varchar(20)     default '000000'           comment '租户编号',
@@ -175,7 +170,6 @@
-- ----------------------------
-- 3、岗位信息表
-- ----------------------------
drop table if exists sys_post;
create table sys_post
(
    post_id       bigint(20)      not null                   comment '岗位ID',
@@ -205,7 +199,6 @@
-- ----------------------------
-- 4、角色信息表
-- ----------------------------
drop table if exists sys_role;
create table sys_role (
    role_id              bigint(20)      not null                   comment '角色ID',
    tenant_id            varchar(20)     default '000000'           comment '租户编号',
@@ -236,7 +229,6 @@
-- ----------------------------
-- 5、菜单权限表
-- ----------------------------
drop table if exists sys_menu;
create table sys_menu (
    menu_id           bigint(20)      not null                   comment '菜单ID',
    menu_name         varchar(50)     not null                   comment '菜单名称',
@@ -413,7 +405,6 @@
-- ----------------------------
-- 6、用户和角色关联表  用户N-1角色
-- ----------------------------
drop table if exists sys_user_role;
create table sys_user_role (
    user_id   bigint(20) not null comment '用户ID',
    role_id   bigint(20) not null comment '角色ID',
@@ -430,7 +421,6 @@
-- ----------------------------
-- 7、角色和菜单关联表  角色1-N菜单
-- ----------------------------
drop table if exists sys_role_menu;
create table sys_role_menu (
    role_id   bigint(20) not null comment '角色ID',
    menu_id   bigint(20) not null comment '菜单ID',
@@ -527,7 +517,6 @@
-- ----------------------------
-- 8、角色和部门关联表  角色1-N部门
-- ----------------------------
drop table if exists sys_role_dept;
create table sys_role_dept (
    role_id   bigint(20) not null comment '角色ID',
    dept_id   bigint(20) not null comment '部门ID',
@@ -537,7 +526,6 @@
-- ----------------------------
-- 9、用户与岗位关联表  用户1-N岗位
-- ----------------------------
drop table if exists sys_user_post;
create table sys_user_post
(
    user_id   bigint(20) not null comment '用户ID',
@@ -553,7 +541,6 @@
-- ----------------------------
-- 10、操作日志记录
-- ----------------------------
drop table if exists sys_oper_log;
create table sys_oper_log (
    oper_id           bigint(20)      not null                   comment '日志主键',
    tenant_id         varchar(20)     default '000000'           comment '租户编号',
@@ -583,7 +570,6 @@
-- ----------------------------
-- 11、字典类型表
-- ----------------------------
drop table if exists sys_dict_type;
create table sys_dict_type
(
    dict_id          bigint(20)      not null                   comment '字典主键',
@@ -615,7 +601,6 @@
-- ----------------------------
-- 12、字典数据表
-- ----------------------------
drop table if exists sys_dict_data;
create table sys_dict_data
(
    dict_code        bigint(20)      not null                   comment '字典编码',
@@ -675,7 +660,6 @@
-- ----------------------------
-- 13、参数配置表
-- ----------------------------
drop table if exists sys_config;
create table sys_config (
    config_id         bigint(20)      not null                   comment '参数主键',
    tenant_id         varchar(20)     default '000000'           comment '租户编号',
@@ -702,7 +686,6 @@
-- ----------------------------
-- 14、系统访问记录
-- ----------------------------
drop table if exists sys_logininfor;
create table sys_logininfor (
    info_id        bigint(20)     not null                  comment '访问ID',
    tenant_id      varchar(20)    default '000000'          comment '租户编号',
@@ -725,7 +708,6 @@
-- ----------------------------
-- 17、通知公告表
-- ----------------------------
drop table if exists sys_notice;
create table sys_notice (
    notice_id         bigint(20)      not null                   comment '公告ID',
    tenant_id         varchar(20)     default '000000'           comment '租户编号',
@@ -752,7 +734,6 @@
-- ----------------------------
-- 18、代码生成业务表
-- ----------------------------
drop table if exists gen_table;
create table gen_table (
    table_id          bigint(20)      not null                   comment '编号',
    data_name         varchar(200)    default ''                 comment '数据源名称',
@@ -783,7 +764,6 @@
-- ----------------------------
-- 19、代码生成业务表字段
-- ----------------------------
drop table if exists gen_table_column;
create table gen_table_column (
    column_id         bigint(20)      not null                   comment '编号',
    table_id          bigint(20)                                 comment '归属表编号',
@@ -814,7 +794,6 @@
-- ----------------------------
-- OSS对象存储表
-- ----------------------------
drop table if exists sys_oss;
create table sys_oss (
    oss_id          bigint(20)   not null                   comment '对象存储主键',
    tenant_id       varchar(20)           default '000000'  comment '租户编号',
@@ -834,7 +813,6 @@
-- ----------------------------
-- OSS对象存储动态配置表
-- ----------------------------
drop table if exists sys_oss_config;
create table sys_oss_config (
    oss_config_id   bigint(20)    not null                  comment '主建',
    tenant_id       varchar(20)             default '000000'comment '租户编号',
@@ -868,7 +846,6 @@
-- ----------------------------
-- 系统授权表
-- ----------------------------
drop table if exists sys_client;
create table sys_client (
    id                  bigint(20)    not null            comment 'id',
    client_id           varchar(64)   default null        comment '客户端id',