记录SQL 创建语句
CREATE TABLE "CONFIG_INFO" (
"ID" NUMBER(20) NOT NULL ,
"DATA_ID" VARCHAR2(255 BYTE) NOT NULL ,
"GROUP_ID" VARCHAR2(255 BYTE) DEFAULT NULL ,
"CONTENT" CLOB NOT NULL ,
"MD5" VARCHAR2(32 BYTE) DEFAULT NULL ,
"GMT_CREATE" DATE NOT NULL ,
"GMT_MODIFIED" DATE NOT NULL ,
"SRC_USER" CLOB ,
"SRC_IP" VARCHAR2(20 BYTE) ,
"APP_NAME" VARCHAR2(128 BYTE) ,
"TENANT_ID" VARCHAR2(128 BYTE) DEFAULT '' ,
"C_DESC" VARCHAR2(256 BYTE) DEFAULT NULL ,
"C_USE" VARCHAR2(64 BYTE) ,
"EFFECT" VARCHAR2(64 BYTE) DEFAULT NULL ,
"TYPE" VARCHAR2(64 BYTE) DEFAULT NULL ,
"C_SCHEMA" CLOB
);
COMMENT ON COLUMN "CONFIG_INFO"."ID" IS 'id';
COMMENT ON COLUMN "CONFIG_INFO"."DATA_ID" IS 'data_id';
COMMENT ON COLUMN "CONFIG_INFO"."CONTENT" IS 'content';
COMMENT ON COLUMN "CONFIG_INFO"."MD5" IS 'md5';
COMMENT ON COLUMN "CONFIG_INFO"."GMT_CREATE" IS '创建时间';
COMMENT ON COLUMN "CONFIG_INFO"."SRC_IP" IS 'source ip';
COMMENT ON TABLE "CONFIG_INFO" IS '租户字段';
ALTER TABLE "CONFIG_INFO" ADD CONSTRAINT "BIN$2Z6vstsGCfDgUBGsBABjQQ==$0" PRIMARY KEY ("ID");
ALTER TABLE "CONFIG_INFO" ADD CONSTRAINT "BIN$2Z6vstsHCfDgUBGsBABjQQ==$0" UNIQUE ("DATA_ID", "GROUP_ID", "TENANT_ID") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
CREATE SEQUENCE "CONFIG_INFO_ID" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;
CREATE UNIQUE INDEX "BIN$2Z6vstsSCfDgUBGsBABjQQ==$0" ON "CONFIG_INFO" ("ID")
CREATE UNIQUE INDEX "BIN$2Z6vstsTCfDgUBGsBABjQQ==$0" ON "CONFIG_INFO" ("GROUP_ID" ASC, "TENANT_ID" ASC, "DATA_ID" ASC)
CREATE TRIGGER "BIN$2Z6vstsUCfDgUBGsBABjQQ==$0" BEFORE INSERT ON "CONFIG_INFO" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW
begin
select CONFIG_INFO_ID.nextval into:new.ID from dual;
end;
|