-- MySQL Workbench Synchronization
-- Generated: 2016-08-08 09:54
-- Model: SoG
-- Version: 1.3.13
-- 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_keyholder_group` 
CHANGE COLUMN `group_name` `group_name` VARCHAR(64) CHARACTER SET 'utf8' NULL DEFAULT NULL ,
CHANGE COLUMN `group_description` `group_description` VARCHAR(200) CHARACTER SET 'utf8' NULL DEFAULT NULL ;

ALTER TABLE `sog`.`glam_transaction_schedule` 
ADD COLUMN `trans_confirmed` BIT(1) NULL DEFAULT b'0' AFTER `is_dynamic`,
ADD COLUMN `trans_confirmed_on` DATETIME NULL DEFAULT NULL AFTER `trans_confirmed`,
ADD COLUMN `trans_confirmed_by` CHAR(36) NULL DEFAULT NULL AFTER `trans_confirmed_on`;

ALTER TABLE `sog`.`versioning` 
CHANGE COLUMN `version_string` `version_string` VARCHAR(10) CHARACTER SET 'utf8' NULL DEFAULT NULL ;

ALTER TABLE `sog`.`glam_his_transaction_schedule` 
ADD COLUMN `trans_confirmed` BIT(1) NULL DEFAULT b'0' AFTER `is_dynamic`,
ADD COLUMN `trans_confirmed_on` DATETIME NULL DEFAULT NULL AFTER `trans_confirmed`,
ADD COLUMN `trans_confirmed_by` CHAR(36) NULL DEFAULT NULL AFTER `trans_confirmed_on`;

ALTER TABLE `sog`.`glam_ext_exam_schedule_ap` 
ADD COLUMN `last_changed_by` CHAR(36) NULL DEFAULT NULL AFTER `access_point_rf_id`,
ADD COLUMN `last_changed_on` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `last_changed_by`;

ALTER TABLE `sog`.`glam_ext_exam_schedule_oh` 
ADD COLUMN `last_changed_by` CHAR(36) NULL DEFAULT NULL AFTER `objholder_id`,
ADD COLUMN `last_changed_on` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `last_changed_by`;

-- -----------------------------------------------------
-- Data for table `sog`.`krf_user`
-- -----------------------------------------------------
START TRANSACTION;
USE `sog`;

INSERT INTO `sog`.`krf_user` (`usr_id`, `usr_username`, `usr_password`, `usr_firstname`, `usr_lastname`, `usr_contact_cell_no`, `usr_contact_work_no`, `usr_contact_email`, `usr_employee_no`, `usr_is_active`, `usr_system_role`, `usr_last_login`, `usr_api_key`, `usr_timezone_id`, `is_deleted`, `last_changed_by`, `last_changed_on`, `version`) VALUES ('1bd19303-8da9-4813-9b73-fe9723472ef7', 'glam_and', '362cf9a9f03079d7adf2ae24f9a29318', 'Glam_And', 'Glam_And', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL);

COMMIT;

-- -----------------------------------------------------
-- Data for table `sog`.`krf_user_application`
-- -----------------------------------------------------
START TRANSACTION;
USE `sog`;

INSERT INTO `sog`.`krf_user_application` (`app_id`, `usr_id`, `app_role_id`, `last_changed_by`, `last_changed_on`, `version`, `is_deleted`) VALUES ('dfcc552b-62ef-11e2-a2e9-e8039a3b0793', '1bd19303-8da9-4813-9b73-fe9723472ef7', 'd4fbc164-bac0-4315-aee6-617340fea023', NULL, NULL, NULL, NULL);

COMMIT;

USE `sog`;
INSERT INTO `sog`.`versioning` (version_name, version_desc, version, version_string) values ('database', 'Database version',66317,'1.3.13');

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