CREATE SCHEMA NICEPORTAL;

CREATE COLUMN TABLE "NICEPORTAL"."UO_CRM_DATA_CONTRACTS" ("ID" BIGINT CS_FIXED NOT NULL ,
	 "ID_MSD" VARCHAR(50) NOT NULL ,
	 "ID_CRM" VARCHAR(30) NOT NULL ,
	 "JSONRAW" NCLOB MEMORY THRESHOLD 1000,
	 "B1_CODE" VARCHAR(50),
	 "CREATE_TS" LONGDATE CS_LONGDATE DEFAULT CURRENT_TIMESTAMP NOT NULL ,
	 "UPDATE_TS" LONGDATE CS_LONGDATE NOT NULL ,
	 "RESPONSE_STATUS" VARCHAR(50),
	 "RESPONSE_MESSAGE" NCLOB MEMORY THRESHOLD 1000,
	 PRIMARY KEY ("ID")) UNLOAD PRIORITY 5 AUTO MERGE;

CREATE SEQUENCE "NICEPORTAL"."SEQ_CONTRACT_ID";
