CREATE TABLE blc_notification_state (id VARCHAR(36) NOT NULL, acked CHAR(1) DEFAULT 'N' NOT NULL, attempts INTEGER, change_timestamp TIMESTAMP WITHOUT TIME ZONE, change_timestamp_ack TIMESTAMP WITHOUT TIME ZONE, container VARCHAR(36), entity_type VARCHAR(255) NOT NULL, message_type VARCHAR(255), message_value VARCHAR(10485760), notification_name VARCHAR(255), next_attempt TIMESTAMP WITHOUT TIME ZONE, stopped CHAR(1) DEFAULT 'N' NOT NULL, CONSTRAINT blc_notification_state_pkey PRIMARY KEY (id));
CREATE TABLE blc_resource_lock (id VARCHAR(36) NOT NULL, concept_key VARCHAR(255), context_id VARCHAR(36), lock_expiration_timestamp TIMESTAMP WITHOUT TIME ZONE, locked CHAR(1) DEFAULT 'N', sandbox_id VARCHAR(36), lock_timestamp TIMESTAMP WITHOUT TIME ZONE, token VARCHAR(255), type_alias VARCHAR(255), CONSTRAINT blc_resource_lock_pkey PRIMARY KEY (id));
CREATE INDEX idx7i0i5vcl1dkkwuq5dyc88wem5 ON blc_notification_state(acked);
CREATE INDEX idxgfaqe3xmq5q4yh78mix1g04fy ON blc_notification_state(container);
CREATE INDEX idxkm4y3qj3jh2mpt0rt6l6vscl8 ON blc_resource_lock(token);
ALTER TABLE blc_resource_lock ADD CONSTRAINT uk7iegjt4gojv24q9bw8k0i4j0c UNIQUE (context_id, type_alias, sandbox_id, concept_key);
CREATE TABLE blc_shipment_details (id VARCHAR(36) NOT NULL, attributes VARCHAR(10485760), external_id VARCHAR(255), fulfillment_option VARCHAR(255), order_fulfillment_context_id VARCHAR(36), trk_archived CHAR(1) DEFAULT 'N' NOT NULL, audit_creation_time TIMESTAMP WITHOUT TIME ZONE, audit_creator VARCHAR(60), audit_update_time TIMESTAMP WITHOUT TIME ZONE, audit_updater VARCHAR(60), trk_change_details VARCHAR(10485760), trk_tenant_id VARCHAR(36), CONSTRAINT blc_shipment_details_pkey PRIMARY KEY (id));
CREATE INDEX idx_ful_cntxt_id ON blc_shipment_details(order_fulfillment_context_id);
