CREATE TABLE BLC_NOTIFICATION_STATE (ID VARCHAR2(36 CHAR) NOT NULL, ACKED CHAR(1 CHAR) DEFAULT 'N' NOT NULL, ATTEMPTS NUMBER(10, 0), CHANGE_TIMESTAMP TIMESTAMP(6), CHANGE_TIMESTAMP_ACK TIMESTAMP(6), CONTAINER VARCHAR2(36 CHAR), ENTITY_TYPE VARCHAR2(255 CHAR) NOT NULL, MESSAGE_TYPE VARCHAR2(255 CHAR), MESSAGE_VALUE CLOB, NOTIFICATION_NAME VARCHAR2(255 CHAR), NEXT_ATTEMPT TIMESTAMP(6), STOPPED CHAR(1 CHAR) DEFAULT 'N' NOT NULL, CONSTRAINT CT_WXEY3YPV6WM11ZJ49JGY PRIMARY KEY (ID));
CREATE TABLE BLC_RESOURCE_LOCK (ID VARCHAR2(36 CHAR) NOT NULL, CONCEPT_KEY VARCHAR2(255 CHAR), CONTEXT_ID VARCHAR2(36 CHAR), LOCK_EXPIRATION_TIMESTAMP TIMESTAMP(6), LOCKED CHAR(1 CHAR) DEFAULT 'N', SANDBOX_ID VARCHAR2(36 CHAR), LOCK_TIMESTAMP TIMESTAMP(6), TOKEN VARCHAR2(255 CHAR), TYPE_ALIAS VARCHAR2(255 CHAR), CONSTRAINT CT_IN05YP724LCHAA7SQ69P PRIMARY KEY (ID));
CREATE UNIQUE INDEX UK7IEGJT4GOJV24Q9BW8K0I4J0C ON BLC_RESOURCE_LOCK(CONTEXT_ID, TYPE_ALIAS, SANDBOX_ID, CONCEPT_KEY);
ALTER TABLE BLC_RESOURCE_LOCK ADD CONSTRAINT UK7IEGJT4GOJV24Q9BW8K0I4J0C UNIQUE (CONTEXT_ID, TYPE_ALIAS, SANDBOX_ID, CONCEPT_KEY) USING INDEX UK7IEGJT4GOJV24Q9BW8K0I4J0C;
CREATE INDEX IDX7I0I5VCL1DKKWUQ5DYC88WEM5 ON BLC_NOTIFICATION_STATE(ACKED);
CREATE INDEX IDXGFAQE3XMQ5Q4YH78MIX1G04FY ON BLC_NOTIFICATION_STATE(CONTAINER);
CREATE INDEX IDXKM4Y3QJ3JH2MPT0RT6L6VSCL8 ON BLC_RESOURCE_LOCK(TOKEN);
CREATE TABLE BLC_SHIPMENT_DETAILS (ID VARCHAR2(36 CHAR) NOT NULL, ATTRIBUTES CLOB, EXTERNAL_ID VARCHAR2(255 CHAR), FULFILLMENT_OPTION VARCHAR2(255 CHAR), ORDER_FULFILLMENT_CONTEXT_ID VARCHAR2(36 CHAR), TRK_ARCHIVED CHAR(1 CHAR) DEFAULT 'N' NOT NULL, AUDIT_CREATION_TIME TIMESTAMP(6), AUDIT_CREATOR VARCHAR2(60 CHAR), AUDIT_UPDATE_TIME TIMESTAMP(6), AUDIT_UPDATER VARCHAR2(60 CHAR), TRK_CHANGE_DETAILS CLOB, TRK_TENANT_ID VARCHAR2(36 CHAR), CONSTRAINT CT_LSR1NA10G7UT0Y8OQARV PRIMARY KEY (ID));
CREATE INDEX IDX_FUL_CNTXT_ID ON BLC_SHIPMENT_DETAILS(ORDER_FULFILLMENT_CONTEXT_ID);
