CREATE TABLE blc_admin_menu_item (id VARCHAR(36) NOT NULL, context_id VARCHAR(36) NULL, display_order BIGINT DEFAULT NULL NULL, icon VARCHAR(255) NULL, label VARCHAR(255) NULL, parent_menu_item_context_id VARCHAR(36) NULL, trk_archived CHAR(1) DEFAULT 'N' NOT NULL, trk_change_details LONGTEXT NULL, trk_tenant_id VARCHAR(36) NULL, url VARCHAR(255) NULL, CONSTRAINT PK_BLC_ADMIN_MENU_ITEM PRIMARY KEY (id));
CREATE TABLE blc_notification_state (id VARCHAR(36) NOT NULL, acked CHAR(1) DEFAULT 'N' NOT NULL, attempts INT DEFAULT NULL NULL, change_timestamp datetime DEFAULT NULL NULL, change_timestamp_ack datetime DEFAULT NULL NULL, container VARCHAR(36) NULL, entity_type VARCHAR(255) NOT NULL, message_type VARCHAR(255) NULL, message_value LONGTEXT NULL, notification_name VARCHAR(255) NULL, next_attempt datetime DEFAULT NULL NULL, stopped CHAR(1) DEFAULT 'N' NOT NULL, CONSTRAINT PK_BLC_NOTIFICATION_STATE PRIMARY KEY (id));
CREATE TABLE blc_resource_lock (id VARCHAR(36) NOT NULL, concept_key VARCHAR(255) NULL, context_id VARCHAR(36) NULL, lock_expiration_timestamp datetime DEFAULT NULL NULL, `locked` CHAR(1) DEFAULT 'N' NULL, sandbox_id VARCHAR(36) NULL, lock_timestamp datetime DEFAULT NULL NULL, token VARCHAR(255) NULL, type_alias VARCHAR(255) NULL, CONSTRAINT PK_BLC_RESOURCE_LOCK PRIMARY KEY (id));
ALTER TABLE blc_resource_lock ADD CONSTRAINT UK7iegjt4gojv24q9bw8k0i4j0c UNIQUE (context_id, type_alias, sandbox_id, concept_key);
CREATE INDEX IDX7i0i5vcl1dkkwuq5dyc88wem5 ON blc_notification_state(acked);
CREATE INDEX IDXcd0ho33fodsm5m2475vgyuao5 ON blc_admin_menu_item(parent_menu_item_context_id);
CREATE INDEX IDXgfaqe3xmq5q4yh78mix1g04fy ON blc_notification_state(container);
CREATE INDEX IDXk3vuwdat4cg0nwft44jtgim6b ON blc_admin_menu_item(context_id);
CREATE INDEX IDXkm4y3qj3jh2mpt0rt6l6vscl8 ON blc_resource_lock(token);
