-------------------------- 现在版本
DROP TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT";
DROP TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT";
CREATE TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT"
(
"SLI_ID" VARCHAR2(60) NOT NULL,
"AGG_TT_ID" NUMBER(38,0) NOT NULL,
"RECORD_STATUS" NUMBER(1,0) NOT NULL,
"INCIDENT_TIME" TIMESTAMP (6) NOT NULL,
"INSERT_TIME" TIMESTAMP (6) NOT NULL,
"PRE_INCIDENT_TIME" TIMESTAMP (6),
"UPDATE_SEQ" NUMBER(38,0) NOT NULL,
"SLA_GROUP_ID" VARCHAR2(50) NOT NULL,
"CAUSE_CODE" VARCHAR2(60),
PRIMARY KEY ("AGG_TT_ID")
);
CREATE UNIQUE INDEX "SCAL_SLAM_SLA"."IDX_INCIDENT_UPDATE_SEQ" ON "SCAL_SLAM_SLA"."SLI_INCIDENT" ("UPDATE_SEQ");
CREATE SEQUENCE "SCAL_SLAM_SLA"."SQ_SLI_INCIDENT" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 240 CACHE 20 NOORDER NOCYCLE ;
----------------------------------原来版本
--------------------------------------------------
CREATE TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT"
( "ID" NUMBER(38,0) NOT NULL ENABLE,
"SLI_ID" VARCHAR2(60) NOT NULL ENABLE,
"RAWEVENT_ID" VARCHAR2(100),
"INCIDENT_TIME" TIMESTAMP (6) NOT NULL ENABLE,
"IS_DELETED" CHAR(1) NOT NULL ENABLE,
"INSERT_TIME" TIMESTAMP (6) NOT NULL ENABLE,
"PRE_EVENT_TIME" TIMESTAMP (6),
"CAUSE_CODE" VARCHAR2(60),
PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ENABLE,
CONSTRAINT "SLI_INCIDENT_ID_FK" FOREIGN KEY ("SLI_ID")
REFERENCES "SCAL_SLAM_SLA"."SLI" ("ID") ENABLE
) PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
CREATE UNIQUE INDEX "SCAL_SLAM_SLA"."SYS_C0014047" ON "SCAL_SLAM_SLA"."SLI_INCIDENT" ("ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
ALTER TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT" MODIFY ("ID" NOT NULL ENABLE);
ALTER TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT" MODIFY ("SLI_ID" NOT NULL ENABLE);
ALTER TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT" MODIFY ("INCIDENT_TIME" NOT NULL ENABLE);
ALTER TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT" MODIFY ("IS_DELETED" NOT NULL ENABLE);
ALTER TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT" MODIFY ("INSERT_TIME" NOT NULL ENABLE);
ALTER TABLE "SCAL_SLAM_SLA"."SLI_INCIDENT" ADD PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ENABLE;