--APP_CONFIG_CATEGORY   ->   PL_CONFIGCATEGORY
ALTER TABLE APP_CONFIG_CATEGORY RENAME TO PL_CONFIGCATEGORY;

--APP_CONFIG_DETAIL   ->   PL_CONFIGDETAIL
ALTER TABLE APP_CONFIG_DETAIL RENAME TO PL_CONFIGDETAIL;

ALTER TABLE PLATFORM_QT RENAME TO PL_QTEMPLATE;
ALTER TABLE PLATFORM_QTD RENAME TO PL_QTEMPLATEDEF;
ALTER TABLE PLATFORM_TYPERIGHT RENAME TO PL_TYPERIGHT;
ALTER TABLE PORTAL_VI RENAME TO PLPORTALVI;
ALTER TABLE PLPAGELAYOUTDEFINATION RENAME TO PLUILAYOUT;

-- 卷定义信息中，将PLIP改为PLSERVICE，描述该卷在哪个服务上
ALTER TABLE PLVOLUME RENAME COLUMN PLIP TO PLSERVICE;

-- 用户添加专业属性
ALTER TABLE PLUSER ADD PLSPECIALTIES VARCHAR2(255);
COMMENT ON COLUMN PLUSER.PLSPECIALTIES IS '专业';

-- 部门添加专业属性
ALTER TABLE PLDEPT ADD PLSPECIALTIES VARCHAR2(255);
COMMENT ON COLUMN PLDEPT.PLSPECIALTIES IS '专业';

-- 部门添加代号属性
ALTER TABLE PLDEPT ADD PLCODE VARCHAR2(50);
COMMENT ON COLUMN PLDEPT.PLCODE IS '代号';

-- UI布局添加样式属性
ALTER TABLE PLUILAYOUT ADD PLSTYLE VARCHAR2(100) NULL;
COMMENT ON COLUMN PLUILAYOUT.PLSTYLE IS 'UI布局样式';

-- 密码策略表字段修改
ALTER TABLE PLPASSWORDSTRATEGY ADD PLCHARTYPES NUMBER(38,0) DEFAULT 1 NOT NULL;
COMMENT ON COLUMN PLPASSWORDSTRATEGY.PLCHARTYPES IS '包含的字符类型';

-- 机器密级管理表
CREATE TABLE "PLMACHSECURITY" 
   (	"PLUID" VARCHAR2(36) NOT NULL ENABLE, 
	"PLNAME" VARCHAR2(100), 
	"IPADDRESS" VARCHAR2(100), 
	"MACADDRESS" VARCHAR2(100), 
	"PLSECRETGRADE" NUMBER DEFAULT 10, 
	"PLCREATETIME" TIMESTAMP (6), 
	"PLCREATOR" VARCHAR2(100), 
	"PLMODIFYTIME" TIMESTAMP (6), 
	"PLMODIFIER" VARCHAR2(100), 
	"PLDESC" VARCHAR2(255), 
	 PRIMARY KEY ("PLUID")
   ) SEGMENT CREATION DEFERRED ;

CREATE UNIQUE INDEX "PLMACHSECURITY_PK" ON "PLMACHSECURITY" ("PLUID") ;
 
CREATE INDEX "PLMACHSECURITY_IPADDRESS_IDX" ON "PLMACHSECURITY" ("IPADDRESS") ;

COMMENT ON TABLE PLMACHSECURITY IS '机器密级信息表';
COMMENT ON COLUMN PLMACHSECURITY.PLNAME IS '机器名';
COMMENT ON COLUMN PLMACHSECURITY.IPADDRESS IS 'IP地址';
COMMENT ON COLUMN PLMACHSECURITY.MACADDRESS IS 'MAC地址';
COMMENT ON COLUMN PLMACHSECURITY.PLSECRETGRADE IS '密级';
COMMENT ON COLUMN PLMACHSECURITY.PLCREATETIME IS '创建时间';
COMMENT ON COLUMN PLMACHSECURITY.PLCREATOR IS '创建者';
COMMENT ON COLUMN PLMACHSECURITY.PLMODIFYTIME IS '修改时间';
COMMENT ON COLUMN PLMACHSECURITY.PLMODIFIER IS '修改者';
COMMENT ON COLUMN PLMACHSECURITY.PLDESC IS '描述';

-- 创建对象类型索引管理表
CREATE TABLE PLTYPEINDEX (
	OID VARCHAR2(36) NOT NULL,
	NAME VARCHAR2(100) NOT NULL,
	TYPENAME VARCHAR2(100) NOT NULL,
	ATTRIBUTES VARCHAR2(250) NOT NULL,
	DESCRIPTION VARCHAR2(250) NULL,
	CREATOR VARCHAR2(50) NULL,
	CREATETIME TIMESTAMP NULL,
	MODIFIER VARCHAR2(50) NULL,
	MODIFYTIME TIMESTAMP NULL,
	CONSTRAINT PK_PLTYPEINDEX PRIMARY KEY ("oid")
);
COMMENT ON TABLE PLTYPEINDEX IS '对象类型索引定义信息';
COMMENT ON COLUMN PLTYPEINDEX."oid" IS '索引对象ID';
COMMENT ON COLUMN PLTYPEINDEX.NAME IS '索引名称';
COMMENT ON COLUMN PLTYPEINDEX.TYPENAME IS '对象类型名称';
COMMENT ON COLUMN PLTYPEINDEX."attributes" IS '索引属性名称，多个属性使用“,”分割';
COMMENT ON COLUMN PLTYPEINDEX.DESCRIPTION IS '描述';
COMMENT ON COLUMN PLTYPEINDEX.CREATOR IS '创建者';
COMMENT ON COLUMN PLTYPEINDEX.CREATETIME IS '创建时间';
COMMENT ON COLUMN PLTYPEINDEX.MODIFIER IS '修改者';
COMMENT ON COLUMN PLTYPEINDEX.MODIFYTIME IS '修改时间';