-- 图标库表
-- Create table
create table PLICON
(
    oid     VARCHAR2(64) not null,
    name    VARCHAR2(128),
    content CLOB,
    type    VARCHAR2(20),
    groups  VARCHAR2(500)
)
    tablespace MPM550_TEST
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
-- Add comments to the columns
comment on column PLICON.name
  is '图标名称';
comment on column PLICON.content
  is '图标svg内容';
comment on column PLICON.type
  is '图标类型。svg，png等';
comment on column PLICON.groups
  is '图标分组。多个用逗号分割。';
-- Create/Recreate indexes
create index PK_ICON_NAME on PLICON (NAME);
-- Create/Recreate primary, unique and foreign key constraints
alter table PLICON
    add constraint PK_ICON primary key (OID);


--用户配置表
-- Create table
create table PLUSERCONFIG
(
    oid      VARCHAR2(64) not null,
    name     VARCHAR2(64),
    type     VARCHAR2(64),
    content  CLOB,
    userid   VARCHAR2(20),
    username VARCHAR2(64)
);
-- Add comments to the columns
comment on column PLUSERCONFIG.name
  is '配置名称';
comment on column PLUSERCONFIG.type
  is '用户配置类型：home:首页配置,search:全局搜索';
comment on column PLUSERCONFIG.content
  is '用户配置内容。json格式';
comment on column PLUSERCONFIG.userid
  is '用户账号';
comment on column PLUSERCONFIG.username
  is '用户名称';
-- Create/Recreate indexes
create index PK_USERCONFIG_NAME on PLUSERCONFIG (NAME);
create index PK_USERCONFIG_NAME_TYPE on PLUSERCONFIG (TYPE, NAME);
create index PK_USERCONFIG_TYPE on PLUSERCONFIG (TYPE);
-- Create/Recreate primary, unique and foreign key constraints
alter table PLUSERCONFIG add constraint PK_USERCONFIG primary key (OID);
