-- MySQL Workbench Synchronization
-- Generated: 2019-06-14 11:31
-- Model: SoG
-- Version: 1.3.23
-- Project: GLam
-- Author: JaX

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';

ALTER TABLE `sog`.`glam_access_point` 
ADD COLUMN `ap_comms_interface` ENUM('RF', 'BT') NULL DEFAULT 'RF' AFTER `gsm_coverage`;

ALTER TABLE `sog`.`glam_access_object_key` 
ADD COLUMN `key_comms_interface` ENUM('RF', 'BT') NULL DEFAULT 'RF' AFTER `key_allow_dynamic_transactions`,
ADD COLUMN `key_validated` BIT(1) NULL DEFAULT b'1' AFTER `key_comms_interface`,
ADD COLUMN `key_validated_by` CHAR(36) NULL DEFAULT NULL AFTER `key_validated`,
ADD COLUMN `key_validated_on` DATETIME NULL DEFAULT NULL AFTER `key_validated_by`;

ALTER TABLE `sog`.`glam_his_access_object_key` 
CHANGE COLUMN `his_action` `his_action` ENUM('ADDED', 'UPDATED', 'DELETED', 'ASSIGNED', 'DEASSIGNED', 'VALIDATED', 'INVALIDATED') NULL DEFAULT NULL ,
ADD COLUMN `key_comms_interface` ENUM('RF', 'BT') NULL DEFAULT 'RF' AFTER `key_allow_dynamic_transactions`,
ADD COLUMN `key_validated` BIT(1) NULL DEFAULT b'1' AFTER `key_comms_interface`,
ADD COLUMN `key_validated_by` CHAR(36) NULL DEFAULT NULL AFTER `key_validated`,
ADD COLUMN `key_validated_on` DATETIME NULL DEFAULT NULL AFTER `key_validated_by`;


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
