create table "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION
(
    ID            BIGINT,
    ROLE_ID       BIGINT not null,
    MENU_ID       BIGINT not null,
    REMARK        VARCHAR(2000),
    CREATOR       VARCHAR(256)  default '',
    CREATE_TIME   TIMESTAMP default CURRENT_TIMESTAMP not null,
    UPDATER       VARCHAR(256)  default '',
    UPDATE_TIME   TIMESTAMP default CURRENT_TIMESTAMP not null,
    DELETED       TINYINT default 0 not null,
    TENANT_ID     BIGINT default 0 not null
);

comment on table "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION is '角色菜单剔除表';

comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.ID is '主键ID';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.ROLE_ID is '角色ID';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.MENU_ID is '菜单ID';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.REMARK is '备注';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.CREATOR is '创建者';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.CREATE_TIME is '创建时间';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.UPDATER is '更新者';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.UPDATE_TIME is '更新时间';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.DELETED is '是否删除';
comment on column "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION.TENANT_ID is '租户编号';

create unique index "RUOYI-VUE-PRO".IDX_ROLE_MENU_EXCLUSION_ID
    on "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION (ID);

alter table "RUOYI-VUE-PRO".SYSTEM_ROLE_MENU_EXCLUSION
    add constraint PK_ROLE_MENU_EXCLUSION_ID
        primary key (ID);

alter table "RUOYI-VUE-PRO".SYSTEM_ROLE
    add PARENT_ID BIGINT default 0 not null;

alter table "RUOYI-VUE-PRO".SYSTEM_ROLE
    add PARENT_ID BIGINT default 0 not null;
