CREATE DATABASE BS COLLATE utf8mb4_bin; USE BS; DROP TABLE IF EXISTS SE_Entities; SET @@ndb_table_no_logging = 1; CREATE TABLE IF NOT EXISTS SE_Entities ( id BIGINT NOT NULL AUTO_INCREMENT, creationDate TIMESTAMP NOT NULL COMMENT 'Date and Time session creation', dateTo TIMESTAMP NOT NULL DEFAULT '2038-01-01 00:00:00', reservations VARBINARY(13840) NOT NULL COMMENT , PRIMARY KEY (id) ) ENGINE=NDBCLUSTER COMMENT='Sessions pool' PARTITION BY KEY(id); SET @@ndb_table_no_logging = 0; DROP TABLE IF EXISTS ST_Locks; SET @@ndb_table_no_logging = 1; CREATE TABLE IF NOT EXISTS ST_Locks ( id BIGINT NOT NULL AUTO_INCREMENT, executeDate TIMESTAMP NOT NULL COMMENT 'Date and Time request execution', clientRequestId BIGINT NOT NULL COMMENT 'Contains unique clientRequestIds as protection against messages duplication', PRIMARY KEY (id), UNIQUE KEY uk_clientRequestId_STL USING HASH (clientRequestId) ) ENGINE=NDBCLUSTER PARTITION BY KEY(id); SET @@ndb_table_no_logging = 0; COMMIT;