text: SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  START TRANSACTION;
  SET time_zone = "+00:00";
  
  ALTER TABLE `client` ADD `access_id` BIGINT NULL DEFAULT NULL AFTER `remote_id`;
  
  CREATE TABLE `message` (
    `id` int(11) NOT NULL,
    `created` datetime NOT NULL,
    `modified` datetime NOT NULL,
    `client_id` bigint(20) NOT NULL,
    `uid` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
    `type` enum('BootNotification','RemoteChangeResourceStatus','Authorize','DoorStatus','Exception','ConnectionChange','ResourceStatusChange') COLLATE utf8mb4_unicode_ci NOT NULL,
    `state` enum('request','reply') COLLATE utf8mb4_unicode_ci NOT NULL,
    `data` text COLLATE utf8mb4_unicode_ci DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  ALTER TABLE `message`
    ADD PRIMARY KEY (`id`),
    ADD KEY `uid` (`uid`);
  
  ALTER TABLE `message`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  COMMIT;
  