-- Dumping data for table `cw_terminal_key_flex`
--

INSERT INTO `cw_terminal_key_flex` VALUES
(5,'\0','\0','\0','\0','\0',2020,'\0','\0',0,'\0','\0','\0','','','\0','',1,1000,1,'STATIC_OFF','\0','\0','\0','\0','\0','\0',0,0,5,NULL,20,50,31,'\0','ENTRY',NULL),
(6,'\0','\0','\0','\0','\0',2020,'\0','\0',0,'\0','\0','\0','','','\0','',1,1000,1,'STATIC_OFF','\0','\0','\0','\0','\0','\0',0,0,5,NULL,20,50,31,'\0','ENTRY',NULL),
(7,'\0','\0','\0','\0','\0',2020,'\0','\0',3,'\0','\0','\0','','','\0','\0',0,500,1,'STATIC_OFF','\0','\0','\0','\0','\0','\0',0,0,5,NULL,0,0,0,'\0','ENTRY',NULL);

--
-- Table structure for table `cw_terminal_opn`
--

CREATE TABLE `cw_terminal_opn` (
  `id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_opn`
--


--
-- Table structure for table `cw_terminal_seccor`
--

CREATE TABLE `cw_terminal_seccor` (
  `id` bigint(20) NOT NULL,
  `alarm_terminal1_id` bigint(20) DEFAULT NULL,
  `alarm_terminal2_id` bigint(20) DEFAULT NULL,
  `alarm_terminal3_id` bigint(20) DEFAULT NULL,
  `alarm_terminal4_id` bigint(20) DEFAULT NULL,
  `alarm_terminal5_id` bigint(20) DEFAULT NULL,
  `alarm_terminal6_id` bigint(20) DEFAULT NULL,
  `alarm_terminal7_id` bigint(20) DEFAULT NULL,
  `alarm_terminal8_id` bigint(20) DEFAULT NULL,
  `master_identification_id` bigint(20) DEFAULT NULL,
  `master_identification_counter` int(11) NOT NULL,
  `summer_time_change1` datetime DEFAULT NULL,
  `summer_time_change2` datetime DEFAULT NULL,
  `winter_time_change1` datetime DEFAULT NULL,
  `winter_time_change2` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKsyc2mgssw00e4m5wm5w8bgtlb` (`alarm_terminal1_id`),
  KEY `FKg39w667yb360u60jeankjple2` (`alarm_terminal2_id`),
  KEY `FK2wgcgrec08i1xdgk7rbmuydsk` (`alarm_terminal3_id`),
  KEY `FK3d64qsw9umaj0361aj0nftrnm` (`alarm_terminal4_id`),
  KEY `FKiq2mfl3i78g1vtmxghalhhmyg` (`alarm_terminal5_id`),
  KEY `FK8pbh67u4v0q2h2xcj07lmarc8` (`alarm_terminal6_id`),
  KEY `FKaq88u3hgg6eywtx0ygco9txsk` (`alarm_terminal7_id`),
  KEY `FKfy1onr45m39f615md736fp4vw` (`alarm_terminal8_id`),
  KEY `FKjwt2kmadc5ywuubfqemcudhwf` (`master_identification_id`),
  CONSTRAINT `FK2wgcgrec08i1xdgk7rbmuydsk` FOREIGN KEY (`alarm_terminal3_id`) REFERENCES `cw_terminal_seccor` (`id`),
  CONSTRAINT `FK3d64qsw9umaj0361aj0nftrnm` FOREIGN KEY (`alarm_terminal4_id`) REFERENCES `cw_terminal_seccor` (`id`),
  CONSTRAINT `FK8pbh67u4v0q2h2xcj07lmarc8` FOREIGN KEY (`alarm_terminal6_id`) REFERENCES `cw_terminal_seccor` (`id`),
  CONSTRAINT `FKaq88u3hgg6eywtx0ygco9txsk` FOREIGN KEY (`alarm_terminal7_id`) REFERENCES `cw_terminal_seccor` (`id`),
  CONSTRAINT `FKfy1onr45m39f615md736fp4vw` FOREIGN KEY (`alarm_terminal8_id`) REFERENCES `cw_terminal_seccor` (`id`),
  CONSTRAINT `FKg39w667yb360u60jeankjple2` FOREIGN KEY (`alarm_terminal2_id`) REFERENCES `cw_terminal_seccor` (`id`),
  CONSTRAINT `FKiq2mfl3i78g1vtmxghalhhmyg` FOREIGN KEY (`alarm_terminal5_id`) REFERENCES `cw_terminal_seccor` (`id`),
  CONSTRAINT `FKjwt2kmadc5ywuubfqemcudhwf` FOREIGN KEY (`master_identification_id`) REFERENCES `cw_identification` (`id`),
  CONSTRAINT `FKsyc2mgssw00e4m5wm5w8bgtlb` FOREIGN KEY (`alarm_terminal1_id`) REFERENCES `cw_terminal_seccor` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_seccor`
--


--
-- Table structure for table `cw_terminal_simulation`
--

CREATE TABLE `cw_terminal_simulation` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime DEFAULT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `display_time` int(11) NOT NULL,
  `keyboard` bit(1) NOT NULL,
  `keyboard_font_size` int(11) NOT NULL,
  `keyboard_font_size_unit_enum` varchar(255) DEFAULT NULL,
  `keyboard_width_height` int(11) NOT NULL,
  `landscape` bit(1) NOT NULL,
  `last_updated` datetime DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `retour_font_size` int(11) NOT NULL,
  `retour_font_size_unit_enum` varchar(255) DEFAULT NULL,
  `update_counter` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_simulation`
--


--
-- Table structure for table `cw_terminal_simulation_2_menu`
--

CREATE TABLE `cw_terminal_simulation_2_menu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `button_font_size` int(11) NOT NULL,
  `button_font_size_unit_enum` varchar(255) DEFAULT NULL,
  `button_height` int(11) NOT NULL,
  `button_width` int(11) NOT NULL,
  `date_created` datetime DEFAULT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `label_font_size` int(11) NOT NULL,
  `label_font_size_unit_enum` varchar(255) DEFAULT NULL,
  `last_updated` datetime DEFAULT NULL,
  `menu` int(11) NOT NULL,
  `position` int(11) NOT NULL,
  `terminal_simulation_id` bigint(20) NOT NULL,
  `update_counter` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK644p784p2lr44awfxxdulfxm` (`terminal_simulation_id`),
  CONSTRAINT `FK644p784p2lr44awfxxdulfxm` FOREIGN KEY (`terminal_simulation_id`) REFERENCES `cw_terminal_simulation` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_simulation_2_menu`
--


--
-- Table structure for table `cw_terminal_simulation_2_menu_2_function`
--

CREATE TABLE `cw_terminal_simulation_2_menu_2_function` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime DEFAULT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `function_value` varchar(255) DEFAULT NULL,
  `last_updated` datetime DEFAULT NULL,
  `step` int(11) NOT NULL,
  `terminal_simulation2menu_id` bigint(20) NOT NULL,
  `terminal_simulation_function_enum` varchar(255) DEFAULT NULL,
  `update_counter` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKma3uwdx0p53y8c6ghmjkr5v8e` (`terminal_simulation2menu_id`),
  CONSTRAINT `FKma3uwdx0p53y8c6ghmjkr5v8e` FOREIGN KEY (`terminal_simulation2menu_id`) REFERENCES `cw_terminal_simulation_2_menu` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_simulation_2_menu_2_function`
--


--
-- Table structure for table `cw_terminal_sorex`
--

CREATE TABLE `cw_terminal_sorex` (
  `id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_sorex`
--


--
-- Table structure for table `cw_terminal_spooler`
--

CREATE TABLE `cw_terminal_spooler` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `domain_class` varchar(255) DEFAULT NULL,
  `domain_class_id` bigint(20) DEFAULT NULL,
  `spooler_action_type` varchar(255) DEFAULT NULL,
  `terminal_id` bigint(20) DEFAULT NULL,
  `counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKc4xv409rirhuvpjnyqxfb5waq` (`terminal_id`),
  CONSTRAINT `FKc4xv409rirhuvpjnyqxfb5waq` FOREIGN KEY (`terminal_id`) REFERENCES `cw_terminal` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_spooler`
--


--
-- Table structure for table `cw_terminal_text`
--

CREATE TABLE `cw_terminal_text` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `name` varchar(255) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_text`
--

INSERT INTO `cw_terminal_text` VALUES
(1,0,'2018-05-22 11:23:04','\0','Gantner-Texte 1015-05','2018-05-22 11:23:04','GAT 1015-05',0),
(2,0,'2018-05-22 11:23:48','\0','Gantner-Texte 1015-10','2018-05-22 11:23:48','GAT 1015-10',0),
(3,0,'2018-05-22 11:24:28','\0','Gantner-Texte 1032','2018-05-22 11:24:28','GAT 1032',0),
(4,1,'2018-05-22 11:25:18','\0','SuperTrax 4/7','2022-07-02 01:05:04','TMC SuperTrax 4/7',0),
(5,1,'2022-07-02 00:51:44','\0','Trax+G/Prox+F','2022-07-02 01:05:12','TMC Trax+G/Prox+F',0);

--
-- Table structure for table `cw_terminal_text_2_detail`
--

CREATE TABLE `cw_terminal_text_2_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `position` int(11) NOT NULL,
  `terminal_text_id` bigint(20) NOT NULL,
  `text_value` varchar(255) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK9aj5s8s353ccsyaaht7knnlnj` (`terminal_text_id`),
  CONSTRAINT `FK9aj5s8s353ccsyaaht7knnlnj` FOREIGN KEY (`terminal_text_id`) REFERENCES `cw_terminal_text` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=319 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_text_2_detail`
--

INSERT INTO `cw_terminal_text_2_detail` VALUES
(1,0,'2018-05-22 11:23:04','\0','2018-05-22 11:23:04',1,1,'\\w',0),
(2,0,'2018-05-22 11:23:05','\0','2018-05-22 11:23:05',2,1,'\\d       \\t',0),
(3,0,'2018-05-22 11:23:05','\0','2018-05-22 11:23:05',3,1,'Zutritt',0),
(4,0,'2018-05-22 11:23:06','\0','2018-05-22 11:23:06',4,1,'gestattet',0),
(5,0,'2018-05-22 11:23:06','\0','2018-05-22 11:23:06',5,1,'Taster',0),
(6,0,'2018-05-22 11:23:07','\0','2018-05-22 11:23:07',6,1,'Entriegelung',0),
(7,0,'2018-05-22 11:23:07','\0','2018-05-22 11:23:07',7,1,'Sie kommen',0),
(8,0,'2018-05-22 11:23:08','\0','2018-05-22 11:23:08',8,1,'Karte',0),
(9,0,'2018-05-22 11:23:08','\0','2018-05-22 11:23:08',10,1,'Sonntag',0),
(10,0,'2018-05-22 11:23:09','\0','2018-05-22 11:23:09',11,1,'Montag',0),
(11,0,'2018-05-22 11:23:09','\0','2018-05-22 11:23:09',12,1,'Dienstag',0),
(12,0,'2018-05-22 11:23:09','\0','2018-05-22 11:23:09',13,1,'Mittwoch',0),
(13,0,'2018-05-22 11:23:10','\0','2018-05-22 11:23:10',14,1,'Donnerstag',0),
(14,0,'2018-05-22 11:23:10','\0','2018-05-22 11:23:10',15,1,'Freitag',0),
(15,0,'2018-05-22 11:23:11','\0','2018-05-22 11:23:11',16,1,'Samstag',0),
(16,0,'2018-05-22 11:23:11','\0','2018-05-22 11:23:11',17,1,'Sie gehen',0),
(17,0,'2018-05-22 11:23:12','\0','2018-05-22 11:23:12',18,1,'Karte',0),
(18,0,'2018-05-22 11:23:12','\0','2018-05-22 11:23:12',19,1,'Karte ungültig',0),
(19,0,'2018-05-22 11:23:12','\0','2018-05-22 11:23:12',20,1,'Firma ID falsch',0),
(20,0,'2018-05-22 11:23:13','\0','2018-05-22 11:23:13',21,1,'Karte ungültig',0),
(21,0,'2018-05-22 11:23:13','\0','2018-05-22 11:23:13',22,1,'Falsche KartenID',0),
(22,0,'2018-05-22 11:23:14','\0','2018-05-22 11:23:14',23,1,'Karte nicht',0),
(23,0,'2018-05-22 11:23:14','\0','2018-05-22 11:23:14',24,1,'lesbar',0),
(24,0,'2018-05-22 11:23:15','\0','2018-05-22 11:23:15',25,1,'Sie kommen',0),
(25,0,'2018-05-22 11:23:15','\0','2018-05-22 11:23:15',26,1,'Sie gehen',0),
(26,0,'2018-05-22 11:23:16','\0','2018-05-22 11:23:16',27,1,'Karte nicht im',0),
(27,0,'2018-05-22 11:23:16','\0','2018-05-22 11:23:16',28,1,'Personalstamm',0),
(28,0,'2018-05-22 11:23:16','\0','2018-05-22 11:23:16',29,1,'Buchungsspeicher',0),
(29,0,'2018-05-22 11:23:17','\0','2018-05-22 11:23:17',30,1,'voll',0),
(30,0,'2018-05-22 11:23:17','\0','2018-05-22 11:23:17',31,1,'Generell',0),
(31,0,'2018-05-22 11:23:18','\0','2018-05-22 11:23:18',32,1,'verriegelt',0),
(32,0,'2018-05-22 11:23:18','\0','2018-05-22 11:23:18',33,1,'Türe bereits',0),
(33,0,'2018-05-22 11:23:19','\0','2018-05-22 11:23:19',34,1,'entriegelt',0),
(34,0,'2018-05-22 11:23:19','\0','2018-05-22 11:23:19',35,1,'Zeitsperre',0),
(35,0,'2018-05-22 11:23:19','\0','2018-05-22 11:23:19',36,1,'Falscher',0),
(36,0,'2018-05-22 11:23:20','\0','2018-05-22 11:23:20',37,1,'PIN-Code',0),
(37,0,'2018-05-22 11:23:20','\0','2018-05-22 11:23:20',38,1,'Zutritt erlaubt',0),
(38,0,'2018-05-22 11:23:21','\0','2018-05-22 11:23:21',39,1,'Verriegelt',0),
(39,0,'2018-05-22 11:23:21','\0','2018-05-22 11:23:21',40,1,'mit Optokoppler',0),
(40,0,'2018-05-22 11:23:22','\0','2018-05-22 11:23:22',41,1,'2. Person',0),
(41,0,'2018-05-22 11:23:22','\0','2018-05-22 11:23:22',42,1,'2. Person',0),
(42,0,'2018-05-22 11:23:23','\0','2018-05-22 11:23:23',43,1,'Nicht berechtigt',0),
(43,0,'2018-05-22 11:23:23','\0','2018-05-22 11:23:23',44,1,'Relais Nr :',0),
(44,0,'2018-05-22 11:23:23','\0','2018-05-22 11:23:23',45,1,'Nicht berechtigt',0),
(45,0,'2018-05-22 11:23:24','\0','2018-05-22 11:23:24',46,1,'Personalnumber',0),
(46,0,'2018-05-22 11:23:24','\0','2018-05-22 11:23:24',47,1,'Anlagen Karte',0),
(47,0,'2018-05-22 11:23:25','\0','2018-05-22 11:23:25',48,1,'Wiederholsperre',0),
(48,0,'2018-05-22 11:23:25','\0','2018-05-22 11:23:25',49,1,'Anti Pass Sperre',0),
(49,0,'2018-05-22 11:23:26','\0','2018-05-22 11:23:26',50,1,'Schaltrelais',0),
(50,0,'2018-05-22 11:23:26','\0','2018-05-22 11:23:26',51,1,'aktiv schalten',0),
(51,0,'2018-05-22 11:23:27','\0','2018-05-22 11:23:27',52,1,'Aktion nicht',0),
(52,0,'2018-05-22 11:23:27','\0','2018-05-22 11:23:27',53,1,'möglich!',0),
(53,0,'2018-05-22 11:23:27','\0','2018-05-22 11:23:27',54,1,'Schaltrelais',0),
(54,0,'2018-05-22 11:23:28','\0','2018-05-22 11:23:28',55,1,'passiv schalten',0),
(55,0,'2018-05-22 11:23:28','\0','2018-05-22 11:23:28',56,1,'Schaltrelais',0),
(56,0,'2018-05-22 11:23:29','\0','2018-05-22 11:23:29',57,1,'bereits aktiv',0),
(57,0,'2018-05-22 11:23:29','\0','2018-05-22 11:23:29',58,1,'Schaltrelais',0),
(58,0,'2018-05-22 11:23:30','\0','2018-05-22 11:23:30',59,1,'aktiv',0),
(59,0,'2018-05-22 11:23:30','\0','2018-05-22 11:23:30',60,1,'Schaltrelais',0),
(60,0,'2018-05-22 11:23:31','\0','2018-05-22 11:23:31',61,1,'bereits passiv',0),
(61,0,'2018-05-22 11:23:31','\0','2018-05-22 11:23:31',62,1,'Schaltrelais',0),
(62,0,'2018-05-22 11:23:32','\0','2018-05-22 11:23:32',63,1,'passiv',0),
(63,0,'2018-05-22 11:23:32','\0','2018-05-22 11:23:32',64,1,'Bitte',0),
(64,0,'2018-05-22 11:23:32','\0','2018-05-22 11:23:32',65,1,'warten',0),
(65,0,'2018-05-22 11:23:33','\0','2018-05-22 11:23:33',66,1,'Manipulations-',0),
(66,0,'2018-05-22 11:23:33','\0','2018-05-22 11:23:33',67,1,'sperre',0),
(67,0,'2018-05-22 11:23:34','\0','2018-05-22 11:23:34',68,1,'Verriegelt',0),
(68,0,'2018-05-22 11:23:34','\0','2018-05-22 11:23:34',69,1,'\\d       \\t',0),
(69,0,'2018-05-22 11:23:35','\0','2018-05-22 11:23:35',70,1,'Bitte Karte',0),
(70,0,'2018-05-22 11:23:35','\0','2018-05-22 11:23:35',71,1,'einführen',0),
(71,0,'2018-05-22 11:23:35','\0','2018-05-22 11:23:35',72,1,'Bitte eintreten',0),
(72,0,'2018-05-22 11:23:36','\0','2018-05-22 11:23:36',73,1,'\\d       \\t',0),
(73,0,'2018-05-22 11:23:36','\0','2018-05-22 11:23:36',74,1,'Schaltr. passiv',0),
(74,0,'2018-05-22 11:23:37','\0','2018-05-22 11:23:37',75,1,'\\d       \\t',0),
(75,0,'2018-05-22 11:23:37','\0','2018-05-22 11:23:37',76,1,'Schaltr. aktiv',0),
(76,0,'2018-05-22 11:23:38','\0','2018-05-22 11:23:38',77,1,'\\d       \\t',0),
(77,0,'2018-05-22 11:23:38','\0','2018-05-22 11:23:38',78,1,'Abwesend',0),
(78,0,'2018-05-22 11:23:39','\0','2018-05-22 11:23:39',79,1,'Grund 1',0),
(79,0,'2018-05-22 11:23:39','\0','2018-05-22 11:23:39',80,1,'Abwesend',0),
(80,0,'2018-05-22 11:23:40','\0','2018-05-22 11:23:40',81,1,'Grund 2',0),
(81,0,'2018-05-22 11:23:40','\0','2018-05-22 11:23:40',82,1,'Abwesend',0),
(82,0,'2018-05-22 11:23:41','\0','2018-05-22 11:23:41',83,1,'Grund 3',0),
(83,0,'2018-05-22 11:23:41','\0','2018-05-22 11:23:41',84,1,'Grund 1',0),
(84,0,'2018-05-22 11:23:41','\0','2018-05-22 11:23:41',85,1,'Grund 2',0),
(85,0,'2018-05-22 11:23:42','\0','2018-05-22 11:23:42',86,1,'Grund 3',0),
(86,0,'2018-05-22 11:23:42','\0','2018-05-22 11:23:42',87,1,'Anw. Pers.:',0),
(87,0,'2018-05-22 11:23:43','\0','2018-05-22 11:23:43',88,1,'Finger einlesen',0),
(88,0,'2018-05-22 11:23:43','\0','2018-05-22 11:23:43',89,1,'Ungültige',0),
(89,0,'2018-05-22 11:23:44','\0','2018-05-22 11:23:44',90,1,'Verifikation',0),
(90,0,'2018-05-22 11:23:44','\0','2018-05-22 11:23:44',91,1,'/e',0),
(91,0,'2018-05-22 11:23:45','\0','2018-05-22 11:23:45',92,1,'/e',0),
(92,0,'2018-05-22 11:23:45','\0','2018-05-22 11:23:45',93,1,'/e',0),
(93,0,'2018-05-22 11:23:46','\0','2018-05-22 11:23:46',94,1,'/e',0),
(94,0,'2018-05-22 11:23:46','\0','2018-05-22 11:23:46',95,1,'/e',0),
(95,0,'2018-05-22 11:23:46','\0','2018-05-22 11:23:46',96,1,'/e',0),
(96,0,'2018-05-22 11:23:47','\0','2018-05-22 11:23:47',97,1,'/e',0),
(97,0,'2018-05-22 11:23:47','\0','2018-05-22 11:23:47',98,1,'Finger plazieren',0),
(98,0,'2018-05-22 11:23:48','\0','2018-05-22 11:23:48',99,1,'Ok, gültig bis',0),
(99,0,'2018-05-22 11:23:48','\0','2018-05-22 11:23:48',100,1,'/a',0),
(100,0,'2018-05-22 11:23:49','\0','2018-05-22 11:23:49',1,2,'Tastendef. fehlt',0),
(101,0,'2018-05-22 11:23:49','\0','2018-05-22 11:23:49',2,2,'Tastenbel. fehlt',0),
(102,0,'2018-05-22 11:23:50','\0','2018-05-22 11:23:50',3,2,'Funktion ungült.',0),
(103,0,'2018-05-22 11:23:50','\0','2018-05-22 11:23:50',5,2,'\\d       \\t',0),
(104,0,'2018-05-22 11:23:51','\0','2018-05-22 11:23:51',6,2,'Reihenfolge',0),
(105,0,'2018-05-22 11:23:51','\0','2018-05-22 11:23:51',7,2,'falsch! Buchen?',0),
(106,0,'2018-05-22 11:23:51','\0','2018-05-22 11:23:51',10,2,'So',0),
(107,0,'2018-05-22 11:23:52','\0','2018-05-22 11:23:52',11,2,'Mo',0),
(108,0,'2018-05-22 11:23:52','\0','2018-05-22 11:23:52',12,2,'Di',0),
(109,0,'2018-05-22 11:23:53','\0','2018-05-22 11:23:53',13,2,'Mi',0),
(110,0,'2018-05-22 11:23:53','\0','2018-05-22 11:23:53',14,2,'Do',0),
(111,0,'2018-05-22 11:23:54','\0','2018-05-22 11:23:54',15,2,'Fr',0),
(112,0,'2018-05-22 11:23:54','\0','2018-05-22 11:23:54',16,2,'Sa',0),
(113,0,'2018-05-22 11:23:55','\0','2018-05-22 11:23:55',17,2,'Speicher voll',0),
(114,0,'2018-05-22 11:23:55','\0','2018-05-22 11:23:55',18,2,'Pers.: \\E',0),
(115,0,'2018-05-22 11:23:56','\0','2018-05-22 11:23:56',20,2,'Personalkarte',0),
(116,0,'2018-05-22 11:23:56','\0','2018-05-22 11:23:56',21,2,'Kosten.: \\E',0),
(117,0,'2018-05-22 11:23:56','\0','2018-05-22 11:23:56',23,2,'Grund: \\E',0),
(118,0,'2018-05-22 11:23:57','\0','2018-05-22 11:23:57',29,2,'Kost. O. Projekt',0),
(119,0,'2018-05-22 11:23:57','\0','2018-05-22 11:23:57',33,2,'Proj.: \\E',0),
(120,0,'2018-05-22 11:23:58','\0','2018-05-22 11:23:58',36,2,'Buchung erstellt',0),
(121,0,'2018-05-22 11:23:58','\0','2018-05-22 11:23:58',40,2,'Proj.: \\B',0),
(122,0,'2018-05-22 11:23:59','\0','2018-05-22 11:23:59',48,2,'Ihre Karte bitte',0),
(123,0,'2018-05-22 11:23:59','\0','2018-05-22 11:23:59',49,2,'Eingabe ungültig',0),
(124,0,'2018-05-22 11:24:00','\0','2018-05-22 11:24:00',50,2,'\\B',0),
(125,0,'2018-05-22 11:24:00','\0','2018-05-22 11:24:00',51,2,'\\B',0),
(126,0,'2018-05-22 11:24:00','\0','2018-05-22 11:24:00',52,2,'Nicht im Stamm',0),
(127,0,'2018-05-22 11:24:01','\0','2018-05-22 11:24:01',53,2,'Nicht im Stamm',0),
(128,0,'2018-05-22 11:24:01','\0','2018-05-22 11:24:01',54,2,'Karte ungültig',0),
(129,0,'2018-05-22 11:24:02','\0','2018-05-22 11:24:02',55,2,'**** FEHLER ****',0),
(130,0,'2018-05-22 11:24:02','\0','2018-05-22 11:24:02',57,2,'IHRE SALDEN',0),
(131,0,'2018-05-22 11:24:03','\0','2018-05-22 11:24:03',58,2,'NAME:\\n',0),
(132,0,'2018-05-22 11:24:03','\0','2018-05-22 11:24:03',59,2,'DATUM: \\5',0),
(133,0,'2018-05-22 11:24:04','\0','2018-05-22 11:24:04',60,2,'GUTHABEN:\\1',0),
(134,0,'2018-05-22 11:24:04','\0','2018-05-22 11:24:04',61,2,'URLAUB  :\\2',0),
(135,0,'2018-05-22 11:24:04','\0','2018-05-22 11:24:04',62,2,'.',0),
(136,0,'2018-05-22 11:24:05','\0','2018-05-22 11:24:05',63,2,'.',0),
(137,0,'2018-05-22 11:24:05','\0','2018-05-22 11:24:05',64,2,'.',0),
(138,0,'2018-05-22 11:24:06','\0','2018-05-22 11:24:06',65,2,'.',0),
(139,0,'2018-05-22 11:24:06','\0','2018-05-22 11:24:06',66,2,'.',0),
(140,0,'2018-05-22 11:24:07','\0','2018-05-22 11:24:07',67,2,'.',0),
(141,0,'2018-05-22 11:24:07','\0','2018-05-22 11:24:07',68,2,'.',0),
(142,0,'2018-05-22 11:24:08','\0','2018-05-22 11:24:08',69,2,'.',0),
(143,0,'2018-05-22 11:24:08','\0','2018-05-22 11:24:08',70,2,'.',0),
(144,0,'2018-05-22 11:24:08','\0','2018-05-22 11:24:08',71,2,'.',0),
(145,0,'2018-05-22 11:24:09','\0','2018-05-22 11:24:09',72,2,'.',0),
(146,0,'2018-05-22 11:24:09','\0','2018-05-22 11:24:09',85,2,'Kost. unbekannt',0),
(147,0,'2018-05-22 11:24:10','\0','2018-05-22 11:24:10',86,2,'Proj. unbekannt',0),
(148,0,'2018-05-22 11:24:10','\0','2018-05-22 11:24:10',87,2,'Proj.: \\N',0),
(149,0,'2018-05-22 11:24:11','\0','2018-05-22 11:24:11',88,2,'\\B',0),
(150,0,'2018-05-22 11:24:11','\0','2018-05-22 11:24:11',89,2,'Kein Meister',0),
(151,0,'2018-05-22 11:24:12','\0','2018-05-22 11:24:12',94,2,'Bereits anwesend',0),
(152,0,'2018-05-22 11:24:12','\0','2018-05-22 11:24:12',95,2,'Bereits abwesend',0),
(153,0,'2018-05-22 11:24:12','\0','2018-05-22 11:24:12',96,2,'Nicht berechtigt',0),
(154,0,'2018-05-22 11:24:13','\0','2018-05-22 11:24:13',97,2,'\\B',0),
(155,0,'2018-05-22 11:24:13','\0','2018-05-22 11:24:13',98,2,'Grund ungültig',0),
(156,0,'2018-05-22 11:24:14','\0','2018-05-22 11:24:14',99,2,'\\N',0),
(157,0,'2018-05-22 11:24:14','\0','2018-05-22 11:24:14',110,2,'Bitte wählen',0),
(158,0,'2018-05-22 11:24:15','\0','2018-05-22 11:24:15',111,2,'SIE KOMMEN',0),
(159,0,'2018-05-22 11:24:15','\0','2018-05-22 11:24:15',112,2,'SIE GEHEN',0),
(160,0,'2018-05-22 11:24:16','\0','2018-05-22 11:24:16',113,2,'KOMMEN MIT GRUND',0),
(161,0,'2018-05-22 11:24:16','\0','2018-05-22 11:24:16',114,2,'GEHEN MIT GRUND',0),
(162,0,'2018-05-22 11:24:17','\0','2018-05-22 11:24:17',115,2,'TASTE DRUECKEN',0),
(163,0,'2018-05-22 11:24:17','\0','2018-05-22 11:24:17',150,2,'Zutritt',0),
(164,0,'2018-05-22 11:24:18','\0','2018-05-22 11:24:18',151,2,'gestattet',0),
(165,0,'2018-05-22 11:24:18','\0','2018-05-22 11:24:18',152,2,'Taster',0),
(166,0,'2018-05-22 11:24:18','\0','2018-05-22 11:24:18',153,2,'Entriegelung',0),
(167,0,'2018-05-22 11:24:19','\0','2018-05-22 11:24:19',154,2,'Generell',0),
(168,0,'2018-05-22 11:24:19','\0','2018-05-22 11:24:19',155,2,'verriegelt',0),
(169,0,'2018-05-22 11:24:20','\0','2018-05-22 11:24:20',156,2,'Türe bereits',0),
(170,0,'2018-05-22 11:24:20','\0','2018-05-22 11:24:20',157,2,'entriegelt',0),
(171,0,'2018-05-22 11:24:21','\0','2018-05-22 11:24:21',158,2,'Zeitsperre',0),
(172,0,'2018-05-22 11:24:21','\0','2018-05-22 11:24:21',159,2,'Falscher',0),
(173,0,'2018-05-22 11:24:22','\0','2018-05-22 11:24:22',160,2,'PIN Code',0),
(174,0,'2018-05-22 11:24:22','\0','2018-05-22 11:24:22',161,2,'Zutritt erlaubt',0),
(175,0,'2018-05-22 11:24:22','\0','2018-05-22 11:24:22',162,2,'Verriegelt durch',0),
(176,0,'2018-05-22 11:24:23','\0','2018-05-22 11:24:23',163,2,'Optokoppler',0),
(177,0,'2018-05-22 11:24:23','\0','2018-05-22 11:24:23',164,2,'2. Person',0),
(178,0,'2018-05-22 11:24:24','\0','2018-05-22 11:24:24',165,2,'Kein Meister',0),
(179,0,'2018-05-22 11:24:24','\0','2018-05-22 11:24:24',166,2,'Datum abgelaufen',0),
(180,0,'2018-05-22 11:24:25','\0','2018-05-22 11:24:25',168,2,'Wiederholsperre',0),
(181,0,'2018-05-22 11:24:25','\0','2018-05-22 11:24:25',169,2,'Bitte',0),
(182,0,'2018-05-22 11:24:26','\0','2018-05-22 11:24:26',170,2,'warten',0),
(183,0,'2018-05-22 11:24:26','\0','2018-05-22 11:24:26',171,2,'Manipulations-',0),
(184,0,'2018-05-22 11:24:27','\0','2018-05-22 11:24:27',172,2,'sperre',0),
(185,0,'2018-05-22 11:24:27','\0','2018-05-22 11:24:27',173,2,'PIN: \\E',0),
(186,0,'2018-05-22 11:24:27','\0','2018-05-22 11:24:27',174,2,'\\B',0),
(187,0,'2018-05-22 11:24:28','\0','2018-05-22 11:24:28',1,3,'Tastendefinition fehlt',0),
(188,0,'2018-05-22 11:24:29','\0','2018-05-22 11:24:29',2,3,'Tastenbelegung fehl',0),
(189,0,'2018-05-22 11:24:29','\0','2018-05-22 11:24:29',3,3,'Funktion ungültig',0),
(190,0,'2018-05-22 11:24:29','\0','2018-05-22 11:24:29',5,3,'\\d               \\t',0),
(191,0,'2018-05-22 11:24:30','\0','2018-05-22 11:24:30',6,3,'Buchungsreihenfolge falsch!',0),
(192,0,'2018-05-22 11:24:30','\0','2018-05-22 11:24:30',7,3,'Soll die Buchung dennoch erstellt werden',0),
(193,0,'2018-05-22 11:24:31','\0','2018-05-22 11:24:31',8,3,'Nein',0),
(194,0,'2018-05-22 11:24:31','\0','2018-05-22 11:24:31',10,3,'Sonntag',0),
(195,0,'2018-05-22 11:24:32','\0','2018-05-22 11:24:32',11,3,'Montag',0),
(196,0,'2018-05-22 11:24:32','\0','2018-05-22 11:24:32',12,3,'Dienstag',0),
(197,0,'2018-05-22 11:24:33','\0','2018-05-22 11:24:33',13,3,'Mittwoch',0),
(198,0,'2018-05-22 11:24:33','\0','2018-05-22 11:24:33',14,3,'Donnerstag',0),
(199,0,'2018-05-22 11:24:34','\0','2018-05-22 11:24:34',15,3,'Freitag',0),
(200,0,'2018-05-22 11:24:34','\0','2018-05-22 11:24:34',16,3,'Samstag',0),
(201,0,'2018-05-22 11:24:34','\0','2018-05-22 11:24:34',17,3,'Buchungsspeicher voll',0),
(202,0,'2018-05-22 11:24:35','\0','2018-05-22 11:24:35',18,3,'Pers. Nr.: \\E',0),
(203,0,'2018-05-22 11:24:35','\0','2018-05-22 11:24:35',19,3,'Auftr.Folge Nr.: \\N       / \\E',0),
(204,0,'2018-05-22 11:24:36','\0','2018-05-22 11:24:36',20,3,'Bitte Personalkarte durchziehen',0),
(205,0,'2018-05-22 11:24:36','\0','2018-05-22 11:24:36',21,3,'Kostenstelle: \\E',0),
(206,0,'2018-05-22 11:24:37','\0','2018-05-22 11:24:37',22,3,'Bitte Funktion wählen',0),
(207,0,'2018-05-22 11:24:37','\0','2018-05-22 11:24:37',23,3,'Grund : \\E',0),
(208,0,'2018-05-22 11:24:38','\0','2018-05-22 11:24:38',24,3,'Soll eine Buchung erstellt werden?',0),
(209,0,'2018-05-22 11:24:38','\0','2018-05-22 11:24:38',25,3,'Auftrag : \\E',0),
(210,0,'2018-05-22 11:24:38','\0','2018-05-22 11:24:38',26,3,'Folge : \\E',0),
(211,0,'2018-05-22 11:24:39','\0','2018-05-22 11:24:39',27,3,'Arbeitsgang : \\E',0),
(212,0,'2018-05-22 11:24:39','\0','2018-05-22 11:24:39',28,3,'Arbeitsplatz: \\E',0),
(213,0,'2018-05-22 11:24:40','\0','2018-05-22 11:24:40',29,3,'Kostenstelle oder Projekt erfassen',0),
(214,0,'2018-05-22 11:24:40','\0','2018-05-22 11:24:40',30,3,'Menge: \\E',0),
(215,0,'2018-05-22 11:24:41','\0','2018-05-22 11:24:41',31,3,'Bitte Mengeneinheit wählen',0),
(216,0,'2018-05-22 11:24:41','\0','2018-05-22 11:24:41',32,3,'Material: \\E',0),
(217,0,'2018-05-22 11:24:42','\0','2018-05-22 11:24:42',33,3,'Projekt: \\E',0),
(218,0,'2018-05-22 11:24:42','\0','2018-05-22 11:24:42',34,3,'Fremdperson: \\E',0),
(219,0,'2018-05-22 11:24:43','\0','2018-05-22 11:24:43',35,3,'Zeit : \\E',0),
(220,0,'2018-05-22 11:24:43','\0','2018-05-22 11:24:43',36,3,'Buchung wurde erstellt',0),
(221,0,'2018-05-22 11:24:43','\0','2018-05-22 11:24:43',37,3,'Bitte Material erfassen',0),
(222,0,'2018-05-22 11:24:44','\0','2018-05-22 11:24:44',38,3,'Bitte Mengenart wählen',0),
(223,0,'2018-05-22 11:24:44','\0','2018-05-22 11:24:44',39,3,'Anfrage läuft',0),
(224,0,'2018-05-22 11:24:45','\0','2018-05-22 11:24:45',40,3,'Projekt: \\N         \\B',0),
(225,0,'2018-05-22 11:24:45','\0','2018-05-22 11:24:45',41,3,'weiter                     Ende',0),
(226,0,'2018-05-22 11:24:46','\0','2018-05-22 11:24:46',42,3,'Ende',0),
(227,0,'2018-05-22 11:24:46','\0','2018-05-22 11:24:46',43,3,'Kein Personalstamm angelegt',0),
(228,0,'2018-05-22 11:24:47','\0','2018-05-22 11:24:47',44,3,'Anwesende Personen',0),
(229,0,'2018-05-22 11:24:47','\0','2018-05-22 11:24:47',45,3,'\\n',0),
(230,0,'2018-05-22 11:24:48','\0','2018-05-22 11:24:48',46,3,'Bitte Kostenstelle erfassen',0),
(231,0,'2018-05-22 11:24:48','\0','2018-05-22 11:24:48',47,3,'Bitte Projekt erfassen',0),
(232,0,'2018-05-22 11:24:48','\0','2018-05-22 11:24:48',50,3,'Kostenstelle: \\N        \\B',0),
(233,0,'2018-05-22 11:24:49','\0','2018-05-22 11:24:49',51,3,'\\N         \\B',0),
(234,0,'2018-05-22 11:24:49','\0','2018-05-22 11:24:49',52,3,'Person nicht im Stamm',0),
(235,0,'2018-05-22 11:24:50','\0','2018-05-22 11:24:50',53,3,'Kostenstelle nicht im Stamm',0),
(236,0,'2018-05-22 11:24:50','\0','2018-05-22 11:24:50',54,3,'Karte ungültig',0),
(237,0,'2018-05-22 11:24:51','\0','2018-05-22 11:24:51',55,3,'**** FEHLER ****',0),
(238,0,'2018-05-22 11:24:51','\0','2018-05-22 11:24:51',57,3,'IHRE SALDEN',0),
(239,0,'2018-05-22 11:24:52','\0','2018-05-22 11:24:52',58,3,'NAME: \\n',0),
(240,0,'2018-05-22 11:24:52','\0','2018-05-22 11:24:52',59,3,'DATUM: \\5',0),
(241,0,'2018-05-22 11:24:53','\0','2018-05-22 11:24:53',60,3,'GUTHABEN:\\1',0),
(242,0,'2018-05-22 11:24:53','\0','2018-05-22 11:24:53',61,3,'URLAUB  :\\2',0),
(243,0,'2018-05-22 11:24:54','\0','2018-05-22 11:24:54',62,3,'.',0),
(244,0,'2018-05-22 11:24:54','\0','2018-05-22 11:24:54',63,3,'.',0),
(245,0,'2018-05-22 11:24:54','\0','2018-05-22 11:24:54',64,3,'.',0),
(246,0,'2018-05-22 11:24:55','\0','2018-05-22 11:24:55',65,3,'.',0),
(247,0,'2018-05-22 11:24:55','\0','2018-05-22 11:24:55',66,3,'.',0),
(248,0,'2018-05-22 11:24:56','\0','2018-05-22 11:24:56',67,3,'.',0),
(249,0,'2018-05-22 11:24:57','\0','2018-05-22 11:24:57',68,3,'.',0),
(250,0,'2018-05-22 11:24:57','\0','2018-05-22 11:24:57',69,3,'.',0),
(251,0,'2018-05-22 11:24:57','\0','2018-05-22 11:24:57',70,3,'.',0),
(252,0,'2018-05-22 11:24:58','\0','2018-05-22 11:24:58',71,3,'.',0),
(253,0,'2018-05-22 11:24:58','\0','2018-05-22 11:24:58',72,3,'.',0),
(254,0,'2018-05-22 11:24:59','\0','2018-05-22 11:24:59',73,3,'Arbeitsgang nicht bekannt!',0),
(255,0,'2018-05-22 11:24:59','\0','2018-05-22 11:24:59',74,3,'Arbeitsgang : \\N       \\B',0),
(256,0,'2018-05-22 11:25:00','\0','2018-05-22 11:25:00',75,3,'Arbeitsplatz nicht bekannt!',0),
(257,0,'2018-05-22 11:25:00','\0','2018-05-22 11:25:00',76,3,'Arbeitsplatz: \\N        \\B',0),
(258,0,'2018-05-22 11:25:01','\0','2018-05-22 11:25:01',77,3,'Material nicht bekannt!',0),
(259,0,'2018-05-22 11:25:01','\0','2018-05-22 11:25:01',78,3,'Material: \\N        \\B',0),
(260,0,'2018-05-22 11:25:02','\0','2018-05-22 11:25:02',79,3,'Menge: \\N',0),
(261,0,'2018-05-22 11:25:02','\0','2018-05-22 11:25:02',80,3,'Auftrag: \\N        \\B',0),
(262,0,'2018-05-22 11:25:02','\0','2018-05-22 11:25:02',81,3,'Auftrag nicht bekannt!',0),
(263,0,'2018-05-22 11:25:03','\0','2018-05-22 11:25:03',82,3,'Auftrag: \\N',0),
(264,0,'2018-05-22 11:25:03','\0','2018-05-22 11:25:03',83,3,'Auftrag: \\N',0),
(265,0,'2018-05-22 11:25:04','\0','2018-05-22 11:25:04',84,3,'Folgenummer nicht bekannt',0),
(266,0,'2018-05-22 11:25:04','\0','2018-05-22 11:25:04',85,3,'Kostenstelle unbekannt',0),
(267,0,'2018-05-22 11:25:05','\0','2018-05-22 11:25:05',86,3,'Projekt unbekannt',0),
(268,0,'2018-05-22 11:25:05','\0','2018-05-22 11:25:05',87,3,'Projekt: \\N',0),
(269,0,'2018-05-22 11:25:06','\0','2018-05-22 11:25:06',88,3,'Projekt: \\N         \\B',0),
(270,0,'2018-05-22 11:25:06','\0','2018-05-22 11:25:06',89,3,'Sie haben keine Meisterberechtigung',0),
(271,0,'2018-05-22 11:25:07','\0','2018-05-22 11:25:07',90,3,'Eingabe ungültig',0),
(272,0,'2018-05-22 11:25:07','\0','2018-05-22 11:25:07',91,3,'Korrekturzeit: \\N:\\B',0),
(273,0,'2018-05-22 11:25:08','\0','2018-05-22 11:25:08',92,3,'Keine Antwort vom ISM!',0),
(274,0,'2018-05-22 11:25:08','\0','2018-05-22 11:25:08',93,3,'Keine Antwort vom Leitrechner!',0),
(275,0,'2018-05-22 11:25:08','\0','2018-05-22 11:25:08',94,3,'Sie sind bereits auf anwesend gebucht',0),
(276,0,'2018-05-22 11:25:09','\0','2018-05-22 11:25:09',95,3,'Sie sind bereits auf abwesend gebuch',0),
(277,0,'2018-05-22 11:25:09','\0','2018-05-22 11:25:09',96,3,'Keine Berechtigung für diese Funktion',0),
(278,0,'2018-05-22 11:25:10','\0','2018-05-22 11:25:10',97,3,'Grund: \\N   \\B',0),
(279,0,'2018-05-22 11:25:10','\0','2018-05-22 11:25:10',98,3,'Grund nicht bekannt!',0),
(280,0,'2018-05-22 11:25:11','\0','2018-05-22 11:25:11',99,3,'Person: \\N',0),
(281,0,'2018-05-22 11:25:11','\0','2018-05-22 11:25:11',100,3,'Maschine : \\E',0),
(282,0,'2018-05-22 11:25:12','\0','2018-05-22 11:25:12',101,3,'Maschine: \\N            \\B',0),
(283,0,'2018-05-22 11:25:12','\0','2018-05-22 11:25:12',102,3,'Maschine nicht bekannt',0),
(284,0,'2018-05-22 11:25:13','\0','2018-05-22 11:25:13',103,3,'Maschine: \\N              nicht bekannt!',0),
(285,0,'2018-05-22 11:25:13','\0','2018-05-22 11:25:13',104,3,'Grund auswählen',0),
(286,0,'2018-05-22 11:25:13','\0','2018-05-22 11:25:13',105,3,'Arbeitsplatz auswählen',0),
(287,0,'2018-05-22 11:25:14','\0','2018-05-22 11:25:14',106,3,'Arbeitsgang auswählen',0),
(288,0,'2018-05-22 11:25:14','\0','2018-05-22 11:25:14',107,3,'Auftrag auswählen',0),
(289,0,'2018-05-22 11:25:15','\0','2018-05-22 11:25:15',108,3,'auf ab weiter wählen abbrechen',0),
(290,0,'2018-05-22 11:25:15','\0','2018-05-22 11:25:15',109,3,'auf ab weiter wählen abbrechen',0),
(291,0,'2018-05-22 11:25:16','\0','2018-05-22 11:25:16',110,3,'$$$$ BITTE WÄHLEN SIE EINE FUNKTION $$$$',0),
(292,0,'2018-05-22 11:25:16','\0','2018-05-22 11:25:16',111,3,'$$$$$$$$$$$$$  SIE KOMMEN  $$$$$$$$$$$$$',0),
(293,0,'2018-05-22 11:25:17','\0','2018-05-22 11:25:17',112,3,'$$$$$$$$$$$$$  SIE GEHEN  $$$$$$$$$$$$$',0),
(294,0,'2018-05-22 11:25:17','\0','2018-05-22 11:25:17',113,3,'$$$$$$$$$$  KOMMEN MIT GRUND  $$$$$$$$$$',0),
(295,0,'2018-05-22 11:25:18','\0','2018-05-22 11:25:18',114,3,'$$$$$$$$$$  GEHEN MIT GRUND  $$$$$$$$$$$',0),
(296,0,'2018-05-22 11:25:18','\0','2018-05-22 11:25:18',115,3,'Eingabeformat falsch',0),
(297,0,'2018-05-22 11:25:19','\0','2018-05-22 11:25:19',1,4,'URLAUB :',0),
(298,0,'2018-05-22 11:25:19','\0','2018-05-22 11:25:19',2,4,'GLZ    :',0),
(299,0,'2018-05-22 11:25:20','\0','2018-05-22 11:25:20',3,4,NULL,0),
(300,0,'2018-05-22 11:25:20','\0','2018-05-22 11:25:20',4,4,NULL,0),
(301,0,'2018-05-22 11:25:21','\0','2018-05-22 11:25:21',5,4,NULL,0),
(302,0,'2018-05-22 11:25:21','\0','2018-05-22 11:25:21',6,4,NULL,0),
(303,0,'2018-05-22 11:25:22','\0','2018-05-22 11:25:22',7,4,NULL,0),
(304,0,'2018-05-22 11:25:22','\0','2018-05-22 11:25:22',8,4,NULL,0),
(305,0,'2018-05-22 11:25:23','\0','2018-05-22 11:25:23',9,4,NULL,0),
(306,0,'2018-05-22 11:25:23','\0','2018-05-22 11:25:23',10,4,NULL,0),
(307,0,'2018-05-22 11:25:23','\0','2018-05-22 11:25:23',11,4,'per:',0),
(308,1,'2022-07-02 00:51:46','\0','2022-07-02 00:52:48',1,5,'URLAUB:',0),
(309,1,'2022-07-02 00:51:46','\0','2022-07-02 00:52:48',2,5,'GLZ   :',0),
(310,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',3,5,NULL,0),
(311,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',4,5,NULL,0),
(312,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',5,5,NULL,0),
(313,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',6,5,NULL,0),
(314,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',7,5,NULL,0),
(315,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',8,5,NULL,0),
(316,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',9,5,NULL,0),
(317,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',10,5,NULL,0),
(318,0,'2022-07-02 00:51:46','\0','2022-07-02 00:51:46',11,5,'per:',0);

--
-- Table structure for table `cw_terminal_tmc`
--

CREATE TABLE `cw_terminal_tmc` (
  `id` bigint(20) NOT NULL,
  `identification_format_enum` varchar(255) DEFAULT NULL,
  `web_socket` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_tmc`
--

INSERT INTO `cw_terminal_tmc` VALUES
(9,'DECIMAL','\0');

--
-- Table structure for table `cw_terminal_type`
--

CREATE TABLE `cw_terminal_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `cwid` int(11) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) NOT NULL,
  `last_updated` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_type`
--

INSERT INTO `cw_terminal_type` VALUES
(1,0,1,'2018-02-07 00:36:41','\0','CHIPLOX','2018-02-07 00:36:41',0),
(2,0,101,'2018-02-07 00:36:41','\0','GAT 500','2018-02-07 00:36:41',0),
(3,0,12,'2018-02-07 00:36:42','\0','GAT 505','2018-02-07 00:36:42',0),
(4,0,103,'2018-02-07 00:36:42','\0','GAT 600','2018-02-07 00:36:42',0),
(5,0,104,'2018-02-07 00:36:42','\0','GAT 1002','2018-02-07 00:36:42',0),
(6,0,105,'2018-02-07 00:36:42','\0','GAT 1003','2018-02-07 00:36:42',0),
(7,0,106,'2018-02-07 00:36:42','\0','GAT 1015-05','2018-02-07 00:36:42',0),
(8,0,108,'2018-02-07 00:36:43','\0','GAT 2500','2018-02-07 00:36:43',0),
(9,0,109,'2018-02-07 00:36:43','\0','GAT 3100','2018-02-07 00:36:43',0),
(10,0,107,'2018-02-07 00:36:43','\0','GAT ST260','2018-02-07 00:36:43',0),
(11,0,121,'2018-02-07 00:36:43','\0','GAT 1015-10','2018-02-07 00:36:43',0),
(12,0,122,'2018-02-07 00:36:44','\0','GAT 1015-10 KOMBI','2018-02-07 00:36:44',0),
(13,0,123,'2018-02-07 00:36:44','\0','GAT 1032','2018-02-07 00:36:44',0),
(14,0,124,'2018-02-07 00:36:44','\0','GAT ST 370','2018-02-07 00:36:44',0),
(15,0,151,'2018-02-07 00:36:44','\0','GAT NDI-4','2018-02-07 00:36:44',0),
(16,0,152,'2018-02-07 00:36:44','\0','GAT AT 1000','2018-02-07 00:36:44',0),
(17,0,201,'2018-02-07 00:36:44','\0','KF Normal','2018-02-07 00:36:44',0),
(18,0,206,'2018-02-07 00:36:45','\0','KF Max','2018-02-07 00:36:45',0),
(19,0,202,'2018-02-07 00:36:45','\0','KF Max 2','2018-02-07 00:36:45',0),
(20,0,203,'2018-02-07 00:36:45','\0','KF Max 2 Wiegand','2018-02-07 00:36:45',0),
(21,0,204,'2018-02-07 00:36:45','\0','KF Max 3','2018-02-07 00:36:45',0),
(22,0,205,'2018-02-07 00:36:45','\0','KF Max 3 Wiegand','2018-02-07 00:36:45',0),
(23,0,209,'2018-02-07 00:36:46','\0','KF EMA 2','2018-02-07 00:36:46',0),
(24,0,211,'2018-02-07 00:36:46','\0','KF EMA 3','2018-02-07 00:36:46',0),
(25,0,210,'2018-02-07 00:36:46','\0','KF FINGERPRINT','2018-02-07 00:36:46',0),
(26,0,212,'2018-02-07 00:36:46','\0','KF PINCODE','2018-02-07 00:36:46',0),
(27,0,207,'2018-02-07 00:36:46','\0','TIMEFLEX','2018-02-07 00:36:46',0),
(28,0,208,'2018-02-07 00:36:47','\0','TIMEFLEX2','2018-02-07 00:36:47',0),
(29,0,301,'2018-02-07 00:36:47','\0','TMC Trax+G','2018-02-07 00:36:47',0),
(30,0,302,'2018-02-07 00:36:47','\0','TMC X1 FTP','2018-02-07 00:36:47',0),
(31,1,501,'2018-02-07 00:36:47','\0','OPN','2019-02-25 18:36:47',0),
(32,0,401,'2018-02-07 00:36:47','\0','TMC Online','2018-02-07 00:36:47',0),
(33,1,402,'2018-02-07 00:36:48','\0','DATAFOX-Zeit Online','2022-07-02 00:44:11',0),
(34,0,403,'2018-02-07 00:36:48','\0','WEB Online','2018-02-07 00:36:48',0),
(35,0,404,'2018-02-07 00:36:48','\0','CHIPLOX_ONLINE','2018-02-07 00:36:48',0),
(36,0,126,'2018-05-22 11:22:55','\0','GAT 1022','2018-05-22 11:22:55',0),
(37,0,125,'2018-05-22 11:22:55','\0','GAT ST 380','2018-05-22 11:22:55',0),
(38,0,303,'2018-05-22 11:22:59','\0','TMC SUPERTRAX4 FTP','2018-05-22 11:22:59',0),
(39,0,304,'2018-05-22 11:22:59','\0','TMC SUPERTRAX7 FTP','2018-05-22 11:22:59',0),
(40,0,111,'2019-02-25 18:36:40','\0','GAT DC7200','2019-02-25 18:36:40',0),
(41,0,112,'2019-02-25 18:36:40','\0','GAT DC7200 Foxpro','2019-02-25 18:36:40',0),
(42,0,213,'2019-02-25 18:36:45','\0','KF RELAIS','2019-02-25 18:36:45',0),
(43,0,214,'2019-02-25 18:36:45','\0','KF LOCKER','2019-02-25 18:36:45',0),
(44,0,601,'2020-02-04 10:54:54','\0','SC Standardelektronik','2020-02-04 10:54:54',0),
(45,0,602,'2020-02-04 10:54:54','\0','SC protokollierende Elektronik','2020-02-04 10:54:54',0),
(46,0,603,'2020-02-04 10:54:54','\0','SC protokollierend mit generell offen','2020-02-04 10:54:54',0),
(47,0,604,'2020-02-04 10:54:55','\0','SC protokollierende Elektronik mit Alarm','2020-02-04 10:54:55',0),
(48,0,605,'2020-02-04 10:54:55','\0','SC Alarmelektronik','2020-02-04 10:54:55',0),
(49,0,606,'2020-02-04 10:54:55','\0','SC Auswerteeinheit','2020-02-04 10:54:55',0),
(50,0,607,'2020-02-04 10:54:55','\0','SC Online-Knoten','2020-02-04 10:54:55',0),
(51,0,405,'2020-07-24 19:03:16','\0','Web Applikation','2020-07-24 19:03:16',0),
(52,0,127,'2021-12-25 22:55:12','\0','GAT GT7 TIMEATTENDANCE','2021-12-25 22:55:12',0),
(53,0,305,'2022-07-02 00:44:07','\0','TMC Prox+F','2022-07-02 00:44:07',0),
(54,0,406,'2022-07-02 00:44:11','\0','DATAFOX-Zutritt Online','2022-07-02 00:44:11',0),
(55,0,407,'2022-07-02 00:44:12','\0','DATAFOX-Zeit und Zutritt Online','2022-07-02 00:44:12',0),
(56,0,408,'2022-11-05 13:41:47','\0','DATAFOX-Zeit','2022-11-05 13:41:47',0),
(57,0,409,'2022-11-05 13:41:47','\0','DATAFOX-Zutritt','2022-11-05 13:41:47',0),
(58,0,113,'2024-03-07 09:55:01','\0','GAT 1004','2024-03-07 09:55:01',0),
(59,0,306,'2024-07-14 18:32:33','\0','TMC Trax+G Windows','2024-07-14 18:32:33',0),
(60,0,307,'2024-07-14 18:32:33','\0','TMC Prox+F Windows','2024-07-14 18:32:33',0);

--
-- Table structure for table `cw_terminal_web_app`
--

CREATE TABLE `cw_terminal_web_app` (
  `id` bigint(20) NOT NULL,
  `web_app_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK55csh8181cefhmugninqwfogp` (`web_app_id`),
  CONSTRAINT `FK55csh8181cefhmugninqwfogp` FOREIGN KEY (`web_app_id`) REFERENCES `cw_web_app` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_terminal_web_app`
--


--
-- Table structure for table `cw_text`
--

CREATE TABLE `cw_text` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `cwid` int(11) NOT NULL,
  `description` varchar(255) NOT NULL,
  `text_de` varchar(8000) DEFAULT NULL,
  `text_en` varchar(8000) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_text`
--

INSERT INTO `cw_text` VALUES
(1,0,1,'Menü: Buchungen','Buchungen','booking','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(2,0,2,'Menü: Abwesenheitsplanung','Abwesenheitsplanung','absenceplanning','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(3,0,3,'Menü: PZE-Bericht','PZE-Bericht','time-report','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(4,0,4,'Menü: BDE-Bericht','BDE-Bericht','work-report','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(5,0,1001,'Form: Zeitbuchung','Zeitbuchung','timebooking','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(6,0,1002,'Form: Auftragsbuchung','Auftragsbuchung','workbooking','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(7,0,1003,'Form: Auftragszeit','Auftragszeit','workperiod','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(8,0,1004,'Form: Abwesenheitsplanung','Abwesenheitsplanung','absenceplanning','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(9,0,2001,'Bericht Mitarbeiterkarte: Korrektur','Umbuchung','transfer','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(10,0,10001,'Buchungen: Buchung hinzufuegen','Buchung hinzufuegen','add timebooking','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(11,0,10002,'Buchungen: Buchung (Zeitaenderung) hinzufuegen','Buchung (Zeitaenderung) hinzufuegen','add timebooking (changeable time)','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(12,0,10003,'Buchungen: Auftragsbuchung hinzufuegen','Auftragsbuchung hinzufuegen','add workbooking','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(13,0,10004,'Buchungen: Auftragsbuchung (Zeitaenderung) hinzufuegen','Auftragsbuchung (Zeitaenderung) hinzufuegen','add workbooking (changeable time)','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(14,0,10005,'Buchungen: Auftragszeit hinzufuegen','Auftragszeit hinzufuegen','add workperiod','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(15,0,2002,'Bericht Mitarbeiterkarte:','Tagessumme','daysum','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(16,0,2003,'Bericht Mitarbeiterkarte:','Summe','sum','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(17,0,2004,'Bericht Mitarbeiterkarte:','Wochensum.','weeksum','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(18,0,2005,'Bericht Mitarbeiterkarte:','Saldo Anfang','balance begin','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(19,0,2006,'Bericht Mitarbeiterkarte:','K','C','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(20,0,2007,'Bericht Mitarbeiterkarte:','G','G','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(21,0,2008,'Bericht Mitarbeiterkarte:','Datum','date','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(22,0,2009,'Bericht Mitarbeiterkarte:','Seite','page','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(23,0,2010,'Bericht Mitarbeiterkarte:','Saldo Ende','balance end','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(24,0,2011,'Bericht Mitarbeiterkarte:','WT','wd','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(25,0,2012,'Bericht Mitarbeiterkarte:','Eintrittsdatum','date of entrance','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(26,0,2013,'Bericht Mitarbeiterkarte:','Tagesmodell','time model','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(27,0,2014,'Bericht Mitarbeiterkarte:','Abwesenheit','absence','2021-12-25 00:00:00','\0','2021-12-25 00:00:00',0),
(28,0,1901,'Bericht allgemein:','Seite','page','2021-12-25 22:54:58','\0','2021-12-25 22:54:58',0),
(29,0,1902,'Bericht allgemein:','von','of','2021-12-25 22:54:58','\0','2021-12-25 22:54:58',0),
(30,0,2021,'Bericht Zeitartenstatistik:','Personal-Nr.','person-nr','2021-12-25 22:54:58','\0','2021-12-25 22:54:58',0),
(31,0,2022,'Bericht Zeitartenstatistik:','Name','name','2021-12-25 22:54:58','\0','2021-12-25 22:54:58',0),
(32,0,2023,'Bericht Zeitartenstatistik:','Summe','sum','2021-12-25 22:54:58','\0','2021-12-25 22:54:58',0),
(33,0,11003,'LogisticsPlanning: registration of a vendor (subject)','Logistik-Plattform KUNDENNAME','logistics-platform CUSTOMERNAME','2022-07-02 00:43:47','\0','2022-07-02 00:43:47',0),
(34,0,11004,'LogisticsPlanning: registration of a vendor (body)','Guten Tag,\n<br>\n<br>Sie haben sich erfolgreich im Logistik-Tool der Baustelle TODO:KUNDENNAME für das Projekt TODO:PROJEKTNAME registriert.\n<br>\n<br>Sie erhalten diese Nachricht von der TODO:SICHERHEITSFIRMA – den Verantwortlichen für Sicherheit und Logistik auf der Baustelle.\n<br>Wir stellen Ihnen hiermit den LogIn zur Nutzung des Logistik-Tools zur Verfügung.\n<br>\n<br>Sie haben folgende Daten erfasst:\n<table>\n    <tr>\n        <td>Benutzer</td>\n		<td>[username]</td>\n    </tr>\n	<tr>\n		<td>Firmenname</td>\n        <td>[company.name]</td>\n	</tr>\n    <tr>\n        <td>Vorname</td>\n		<td>[company.firstname]</td>\n    </tr>\n	<tr>\n		<td>Nachname</td>\n        <td>[company.surname]</td>\n	</tr>\n    <tr>\n        <td>Telefonnummer</td>\n		<td>[company.phoneNumber]</td>\n    </tr>\n	<tr>\n		<td>Email</td>\n        <td>[company.email]</td>\n	</tr>\n</table>\n<br>\n<br>\n<br>Anlieferungen auf die Baufelder und Lieferzonen sind nur genehmigt, wenn sie vorher im Logistik-Tool reserviert wurden.\n<br>\n<br>\n<br>Anwendung:\n<br>\n<br>1. Klicken Sie auf den Link und geben Sie in den beiden Feldern den zugesendeten Benutzernamen und Passwort ein.\n<br>- der Link lautet: https://gamma.clockwork.at/TODO:logistikDpr\n<br>- Benutzer: [username]\n<br>- Passwort: [password]\n<br>\n<br>2. Unter \"Stammdaten / Konto verwalten\" können Sie das Passwort ändern und weitere Kontaktpersonen hinzufügen.\n<br>- neue Kontaktpersonen stehen nach einer Neuanmeldung zur Verfügung.\n<br>\n<br>3. Sie können Ihre Termine  mit einem einfachen Klick auf den gewünschten Termin direkt im Kalender reservieren.\n<br>- alternativ unter «Reservierung hinzufügen» eintragen.\n<br>\n<br>4. Tragen Sie zuerst Ihren Anlieferungstermin mit Uhrzeit ein.\n<br>Anlieferung 3,5to Fahrzeug max. 0.45 h Slot\n<br>Anlieferung LKW max. 1½ h Slot\n<br>\n<br>5. Dann markieren Sie Ihren Anlieferungsort (Lieferzone).\n<br>\n<br>6. Den Reservierungsvorgang abschliessen mit «speichern».\n<br>\n<br>7. Zur Kontrolle sehen Sie im Kalender den reservierten Termin.\n<br>\n<br>8. Empfänger und Lieferant können hinterlegt werden.\n<br>\n<br>9. Bedingungen Logistikvorgabe:\n<br>[noch nicht vorhanden]\n<br>\n<br>Falls Sie weitere Kontaktpersonen hinzugefügt haben, können diese ausgewählt werden.\n<br>\n<br>\n<br>Bei Fragen zur Anlieferung: TODO:SICHERHEITSFIRMA / Mobile: TODO:MOBILNUMMER\n<br>mail: TODO:EMAILADRESSE','logistics-platform CUSTOMERNAME (registration of a vendor)','2022-07-02 00:43:47','\0','2022-07-02 00:43:47',0),
(35,0,11011,'LogisticsPlanning: create logisticsPlanning (subject)','Logistik-Plattform KUNDENNAME','logistics-platform CUSTOMERNAME','2022-07-02 00:43:47','\0','2022-07-02 00:43:47',0),
(36,0,11012,'LogisticsPlanning: create logisticsPlanning (body)','Guten Tag,\n<br>\n<br>folgende Lieferung wurde reserviert:\n<table>\n    <tr>\n        <td>Baufeld</td>\n		<td>[loadingPlace]</td>\n    </tr>\n	<tr>\n		<td>Beginn-Zeitpunkt</td>\n        <td>[start]</td>\n	</tr>\n    <tr>\n        <td>Ende-Zeitpunkt</td>\n		<td>[end]</td>\n    </tr>\n	<tr>\n		<td>Firmenname</td>\n        <td>[vendor.name]</td>\n	</tr>\n    <tr>\n        <td>Vorname</td>\n		<td>[vendor2Contact.firstname]</td>\n    </tr>\n	<tr>\n		<td>Nachname</td>\n        <td>[vendor2Contact.surname]</td>\n	</tr>\n    <tr>\n        <td>Telefon</td>\n		<td>[vendor2Contact.phoneNumber]</td>\n    </tr>\n	<tr>\n		<td>Email</td>\n        <td>[vendor2Contact.email]</td>\n	</tr>\n</table>\n<br>\n<br>\n<br>Bei Fragen zur Anlieferung: TODO:SICHERHEITSFIRMA / Mobile: TODO:MOBILNUMMER\n<br>mail: TODO:EMAILADRESSE',NULL,'2022-07-02 00:43:47','\0','2022-07-02 00:43:47',0),
(37,0,11013,'LogisticsPlanning: update logisticsPlanning (subject)','Logistik-Plattform KUNDENNAME','logistics-platform CUSTOMERNAME','2022-07-02 00:43:47','\0','2022-07-02 00:43:47',0),
(38,0,11014,'LogisticsPlanning: update logisticsPlanning (body)','Guten Tag,\n<br>\n<br>folgende Reservierung wurde geändert:\n<table>\n    <tr>\n        <td>Baufeld</td>\n		<td>[loadingPlace]</td>\n    </tr>\n	<tr>\n		<td>Beginn-Zeitpunkt</td>\n        <td>[start]</td>\n	</tr>\n    <tr>\n        <td>Ende-Zeitpunkt</td>\n		<td>[end]</td>\n    </tr>\n	<tr>\n		<td>Firmenname</td>\n        <td>[vendor.name]</td>\n	</tr>\n    <tr>\n        <td>Vorname</td>\n		<td>[vendor2Contact.firstname]</td>\n    </tr>\n	<tr>\n		<td>Nachname</td>\n        <td>[vendor2Contact.surname]</td>\n	</tr>\n    <tr>\n        <td>Telefon</td>\n		<td>[vendor2Contact.phoneNumber]</td>\n    </tr>\n	<tr>\n		<td>Email</td>\n        <td>[vendor2Contact.email]</td>\n	</tr>\n</table>\n<br>\n<br>\n<br>Bei Fragen zur Anlieferung: TODO:SICHERHEITSFIRMA / Mobile: TODO:MOBILNUMMER\n<br>mail: TODO:EMAILADRESSE',NULL,'2022-07-02 00:43:47','\0','2022-07-02 00:43:47',0),
(39,0,11015,'LogisticsPlanning: update logisticsPlanning (subject)','Logistik-Plattform KUNDENNAME','logistics-platform CUSTOMERNAME','2022-07-02 00:43:47','\0','2022-07-02 00:43:47',0),
(40,0,11016,'LogisticsPlanning: delete logisticsPlanning (body)','Guten Tag,\n<br>\n<br>folgende Reservierung wurde gelöscht:\n<table>\n    <tr>\n        <td>Baufeld</td>\n		<td>[loadingPlace]</td>\n    </tr>\n	<tr>\n		<td>Beginn-Zeitpunkt</td>\n        <td>[start]</td>\n	</tr>\n    <tr>\n        <td>Ende-Zeitpunkt</td>\n		<td>[end]</td>\n    </tr>\n	<tr>\n		<td>Firmenname</td>\n        <td>[vendor.name]</td>\n	</tr>\n    <tr>\n        <td>Vorname</td>\n		<td>[vendor2Contact.firstname]</td>\n    </tr>\n	<tr>\n		<td>Nachname</td>\n        <td>[vendor2Contact.surname]</td>\n	</tr>\n    <tr>\n        <td>Telefon</td>\n		<td>[vendor2Contact.phoneNumber]</td>\n    </tr>\n	<tr>\n		<td>Email</td>\n        <td>[vendor2Contact.email]</td>\n	</tr>\n</table>\n<br>\n<br>\n<br>Bei Fragen zur Anlieferung: TODO:SICHERHEITSFIRMA / Mobile: TODO:MOBILNUMMER\n<br>mail: TODO:EMAILADRESSE',NULL,'2022-07-02 00:43:47','\0','2022-07-02 00:43:47',0),
(41,0,1903,'Bericht allgemein:','Dieser Bericht beinhaltet keine Daten!','This report does not contain any data!','2024-03-07 09:48:58','\0','2024-03-07 09:48:58',0),
(42,0,2024,'Bericht Mitarbeiterkarte:','Anspruch','credit','2024-12-07 20:48:26','\0','2024-12-07 20:48:26',0);

--
-- Table structure for table `cw_ticket`
--

CREATE TABLE `cw_ticket` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `number` varchar(255) NOT NULL,
  `priority3enum` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `class` varchar(255) NOT NULL,
  `company_id` bigint(20) DEFAULT NULL,
  `company2contact_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKadfwamn0vqpqygqxrfwv5khch` (`company_id`),
  KEY `FKgfad2a3shb844fjy4ykiqvqww` (`company2contact_id`),
  CONSTRAINT `FKadfwamn0vqpqygqxrfwv5khch` FOREIGN KEY (`company_id`) REFERENCES `cw_company` (`id`),
  CONSTRAINT `FKgfad2a3shb844fjy4ykiqvqww` FOREIGN KEY (`company2contact_id`) REFERENCES `cw_company_2_contact` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_ticket`
--


--
-- Table structure for table `cw_ticket_2_detail`
--

CREATE TABLE `cw_ticket_2_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `duration_of_support` int(11) NOT NULL,
  `last_updated` datetime NOT NULL,
  `position` int(11) NOT NULL,
  `ticket_id` bigint(20) NOT NULL,
  `ticket_state_enum` varchar(255) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKg8o832qkk95rx1mdkitjrcptv` (`ticket_id`),
  KEY `FKpvvo34scu5nwsjsyivmudi00p` (`user_id`),
  CONSTRAINT `FKg8o832qkk95rx1mdkitjrcptv` FOREIGN KEY (`ticket_id`) REFERENCES `cw_ticket` (`id`),
  CONSTRAINT `FKpvvo34scu5nwsjsyivmudi00p` FOREIGN KEY (`user_id`) REFERENCES `cw_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_ticket_2_detail`
--


--
-- Table structure for table `cw_ticket_2_detail_2_information`
--

CREATE TABLE `cw_ticket_2_detail_2_information` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `attachment_filename` varchar(255) DEFAULT NULL,
  `original_attachment_filename` varchar(255) DEFAULT NULL,
  `position` int(11) NOT NULL,
  `text` longtext DEFAULT NULL,
  `ticket2detail_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKera8sccfdx51o1v0rus303i4t` (`ticket2detail_id`),
  CONSTRAINT `FKera8sccfdx51o1v0rus303i4t` FOREIGN KEY (`ticket2detail_id`) REFERENCES `cw_ticket_2_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_ticket_2_detail_2_information`
--


--
-- Table structure for table `cw_ticket_2_detail_2_text`
--

CREATE TABLE `cw_ticket_2_detail_2_text` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `position` int(11) NOT NULL,
  `text` varchar(255) NOT NULL,
  `ticket2detail_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK136nq0tlcarfowlgjcfnovons` (`ticket2detail_id`),
  CONSTRAINT `FK136nq0tlcarfowlgjcfnovons` FOREIGN KEY (`ticket2detail_id`) REFERENCES `cw_ticket_2_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_ticket_2_detail_2_text`
--


--
-- Table structure for table `cw_time_dependet_data_spooler`
--

CREATE TABLE `cw_time_dependet_data_spooler` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date` datetime NOT NULL,
  `class` varchar(255) NOT NULL,
  `person2identification_id` bigint(20) DEFAULT NULL,
  `counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKp66s9kw5dk919qh57jhi6c1cx` (`person2identification_id`),
  CONSTRAINT `FKp66s9kw5dk919qh57jhi6c1cx` FOREIGN KEY (`person2identification_id`) REFERENCES `cw_person_2_identification` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_dependet_data_spooler`
--


--
-- Table structure for table `cw_time_model_2_detail`
--

CREATE TABLE `cw_time_model_2_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `day_enum` varchar(255) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `time_time_model_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `class` varchar(255) NOT NULL,
  `end_time` int(11) DEFAULT NULL,
  `start_time` int(11) DEFAULT NULL,
  `time_time_type_id` bigint(20) DEFAULT NULL,
  `time_time_type2_id` bigint(20) DEFAULT NULL,
  `absence_id` bigint(20) DEFAULT NULL,
  `random_time` int(11) DEFAULT NULL,
  `time` int(11) DEFAULT NULL,
  `time_booking_type_enum` varchar(255) DEFAULT NULL,
  `holiday_time` int(11) DEFAULT NULL,
  `plan_time` int(11) DEFAULT NULL,
  `minimum_attendance_time` int(11) DEFAULT NULL,
  `minimum_pause_duration` int(11) DEFAULT NULL,
  `pause_duration` int(11) DEFAULT NULL,
  `pause_enum` varchar(255) DEFAULT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `shift_time_time_model_id` bigint(20) DEFAULT NULL,
  `week_day_enum` varchar(255) DEFAULT NULL,
  `commercial_round_down_time` int(11) DEFAULT NULL,
  `commercial_round_up_time` int(11) DEFAULT NULL,
  `round_enum` varchar(255) DEFAULT NULL,
  `too_late_round_enum` varchar(255) DEFAULT NULL,
  `too_soon_round_enum` varchar(255) DEFAULT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  `fill_up_absence_time_enum` varchar(255) DEFAULT NULL,
  `paid_absence_time_enum` varchar(255) DEFAULT NULL,
  `value` double DEFAULT NULL,
  `end_permitted_coming_time` int(11) DEFAULT NULL,
  `end_permitted_going_time` int(11) DEFAULT NULL,
  `start_permitted_coming_time` int(11) DEFAULT NULL,
  `start_permitted_going_time` int(11) DEFAULT NULL,
  `time_model_any_time_enum` varchar(255) DEFAULT NULL,
  `generate_coming_by_beginning` bit(1) DEFAULT NULL,
  `generate_going_by_ending` bit(1) DEFAULT NULL,
  `commercial_sum_time` int(11) DEFAULT NULL,
  `number` varchar(255) DEFAULT NULL,
  `round_base_enum` varchar(255) DEFAULT NULL,
  `pause_booking_type_enum` varchar(255) DEFAULT NULL,
  `active` bit(1) DEFAULT NULL,
  `max_minimum_attendance_time` int(11) DEFAULT NULL,
  `absence_general_validation_id` bigint(20) DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKokgg27ysh39xirc402jlc4q43` (`time_time_type_id`),
  KEY `FKt6ow69tl3tem3736iy468ukgd` (`time_time_type2_id`),
  KEY `FKn3lut6idqit91bnyohw9ifw7s` (`absence_id`),
  KEY `FKlh1yqfnk0gclc0cq9ywpitudp` (`shift_time_time_model_id`),
  KEY `FKi79hivplrg90v6hv441xtfm80` (`cost_unit_id`),
  KEY `FKf1d82514p9wxohsj5947i7382` (`machine_id`),
  KEY `FKt6hqcx8s1o95xgnohw5gbxme8` (`order_id`),
  KEY `FKdxno3khqqgy0ky5y9ovw0fm5` (`order_item_id`),
  KEY `FKrvsiqvr89sman5fvr1u7oexrc` (`project_id`),
  KEY `FKkqmmgsml5gsf4e17lslcrwiq7` (`workplace_id`),
  KEY `FKh8a74uu8wjg0abw9bm6efj0ke` (`workprocess_id`),
  KEY `time_time_model_idx` (`time_time_model_id`),
  KEY `time_time_model2_idx` (`class`,`time_time_model_id`,`day_enum`,`deleted`),
  KEY `FK8f1voaa8kpc8ousl2uf1uhvxb` (`absence_general_validation_id`),
  CONSTRAINT `FK8f1voaa8kpc8ousl2uf1uhvxb` FOREIGN KEY (`absence_general_validation_id`) REFERENCES `cw_general_validation` (`id`),
  CONSTRAINT `FKdxno3khqqgy0ky5y9ovw0fm5` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FKf1d82514p9wxohsj5947i7382` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FKfvd6uiyitgcu3o92wgkjgh7yr` FOREIGN KEY (`time_time_model_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKh8a74uu8wjg0abw9bm6efj0ke` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKi79hivplrg90v6hv441xtfm80` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FKkqmmgsml5gsf4e17lslcrwiq7` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKlh1yqfnk0gclc0cq9ywpitudp` FOREIGN KEY (`shift_time_time_model_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKn3lut6idqit91bnyohw9ifw7s` FOREIGN KEY (`absence_id`) REFERENCES `cw_absence` (`id`),
  CONSTRAINT `FKokgg27ysh39xirc402jlc4q43` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKrvsiqvr89sman5fvr1u7oexrc` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FKt6hqcx8s1o95xgnohw5gbxme8` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKt6ow69tl3tem3736iy468ukgd` FOREIGN KEY (`time_time_type2_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_model_2_detail`
--

INSERT INTO `cw_time_model_2_detail` VALUES
(1,0,'2018-02-07 12:41:42','NORMAL','\0','2018-02-07 12:41:42',5,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PlanTime',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,462,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(2,0,'2018-02-07 12:41:42','HOLIDAY_1','\0','2018-02-07 12:41:42',5,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PlanTime',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,462,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(3,0,'2018-02-07 12:41:42','EVERY_DAY','\0','2018-02-07 12:41:42',5,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PermittedComingGoing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1439,1800,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(4,0,'2018-02-07 12:41:42','NORMAL','\0','2018-02-07 12:41:42',5,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2WorkingTime',1020,480,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(5,0,'2018-02-07 12:41:42','NORMAL','\0','2018-02-07 12:41:42',5,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PaidAbsenceTime',1020,480,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TYPE_1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(6,0,'2018-02-07 12:41:43','EVERY_DAY','\0','2018-02-07 12:41:43',5,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2AttendanceTime',1800,0,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(7,0,'2018-02-07 12:41:43','EVERY_DAY','\0','2018-02-07 12:41:43',5,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2MinusTime',NULL,NULL,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(8,0,'2018-02-07 12:41:43','EVERY_DAY','\0','2018-02-07 12:41:43',5,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PlusTime',1800,0,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(9,0,'2018-02-07 12:42:47','EVERY_DAY','\0','2018-02-07 12:42:47',6,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PermittedComingGoing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1439,1800,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(10,0,'2018-02-07 12:42:47','EVERY_DAY','\0','2018-02-07 12:42:47',6,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2AttendanceTime',1800,0,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(11,0,'2018-02-07 12:42:47','EVERY_DAY','\0','2018-02-07 12:42:47',6,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2MinusTime',NULL,NULL,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(12,0,'2018-02-07 12:42:47','EVERY_DAY','\0','2018-02-07 12:42:47',6,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PlusTime',1800,0,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(13,0,'2018-02-07 12:42:56','EVERY_DAY','\0','2018-02-07 12:42:56',7,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PermittedComingGoing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1439,1800,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(14,0,'2018-02-07 12:42:56','EVERY_DAY','\0','2018-02-07 12:42:56',7,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2AttendanceTime',1800,0,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(15,0,'2018-02-07 12:42:56','EVERY_DAY','\0','2018-02-07 12:42:56',7,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2MinusTime',NULL,NULL,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL),
(16,0,'2018-02-07 12:42:56','EVERY_DAY','\0','2018-02-07 12:42:56',7,0,'at.clockwork.time.timeModel.detail.domain.TimeModel2PlusTime',1800,0,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'',0,NULL,NULL);

--
-- Table structure for table `cw_time_model_2_individual_minus_2_minus_time`
--

CREATE TABLE `cw_time_model_2_individual_minus_2_minus_time` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `time_model2individual_minus_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK6d4abbbnlfw4omjy40ffsp83k` (`time_model2individual_minus_id`),
  KEY `FKos2ahbj6vapskv33umbtaenpr` (`time_time_type_id`),
  CONSTRAINT `FK6d4abbbnlfw4omjy40ffsp83k` FOREIGN KEY (`time_model2individual_minus_id`) REFERENCES `cw_time_model_2_detail` (`id`),
  CONSTRAINT `FKos2ahbj6vapskv33umbtaenpr` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_model_2_individual_minus_2_minus_time`
--


--
-- Table structure for table `cw_time_model_2_individual_pause_2_pause_time`
--

CREATE TABLE `cw_time_model_2_individual_pause_2_pause_time` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_time` int(11) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `minimum_attendance_time` int(11) DEFAULT NULL,
  `minimum_pause_duration` int(11) DEFAULT NULL,
  `pause_duration` int(11) DEFAULT NULL,
  `pause_enum` varchar(255) DEFAULT NULL,
  `start_time` int(11) DEFAULT NULL,
  `time_model2individual_pause_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKq2yujeaksbmbu3lsg4ewgk07e` (`time_model2individual_pause_id`),
  CONSTRAINT `FKq2yujeaksbmbu3lsg4ewgk07e` FOREIGN KEY (`time_model2individual_pause_id`) REFERENCES `cw_time_model_2_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_model_2_individual_pause_2_pause_time`
--


--
-- Table structure for table `cw_time_model_2_individual_plus_2_plus_time`
--

CREATE TABLE `cw_time_model_2_individual_plus_2_plus_time` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_time` int(11) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `start_time` int(11) DEFAULT NULL,
  `time_model2individual_plus_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) DEFAULT NULL,
  `time_time_type2_id` bigint(20) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKa5mntcn56vfdj81neawj6y21k` (`time_model2individual_plus_id`),
  KEY `FKnniwailcj7253tmqpuxf0el09` (`time_time_type_id`),
  KEY `FKjpfq5t35vw9hqqfiejaddc0l` (`time_time_type2_id`),
  CONSTRAINT `FKa5mntcn56vfdj81neawj6y21k` FOREIGN KEY (`time_model2individual_plus_id`) REFERENCES `cw_time_model_2_detail` (`id`),
  CONSTRAINT `FKjpfq5t35vw9hqqfiejaddc0l` FOREIGN KEY (`time_time_type2_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKnniwailcj7253tmqpuxf0el09` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_model_2_individual_plus_2_plus_time`
--


--
-- Table structure for table `cw_time_model_2_individual_too_late_2_too_late_time`
--

CREATE TABLE `cw_time_model_2_individual_too_late_2_too_late_time` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_time` int(11) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `start_time` int(11) DEFAULT NULL,
  `time_model2individual_too_late_id` bigint(20) NOT NULL,
  `too_late_round_enum` varchar(255) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKiq4rs5ilkuyqpctwy6pku2b9h` (`time_model2individual_too_late_id`),
  CONSTRAINT `FKiq4rs5ilkuyqpctwy6pku2b9h` FOREIGN KEY (`time_model2individual_too_late_id`) REFERENCES `cw_time_model_2_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_model_2_individual_too_late_2_too_late_time`
--


--
-- Table structure for table `cw_time_model_2_individual_too_soon_2_too_soon_time`
--

CREATE TABLE `cw_time_model_2_individual_too_soon_2_too_soon_time` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_time` int(11) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `start_time` int(11) DEFAULT NULL,
  `time_model2individual_too_soon_id` bigint(20) NOT NULL,
  `too_soon_round_enum` varchar(255) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK7myk5xlyyhh913s91dy5sqwi2` (`time_model2individual_too_soon_id`),
  CONSTRAINT `FK7myk5xlyyhh913s91dy5sqwi2` FOREIGN KEY (`time_model2individual_too_soon_id`) REFERENCES `cw_time_model_2_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_model_2_individual_too_soon_2_too_soon_time`
--


--
-- Table structure for table `cw_time_model_2_pause_time_2_variant`
--

CREATE TABLE `cw_time_model_2_pause_time_2_variant` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `active` bit(1) NOT NULL,
  `date_created` datetime NOT NULL,
  `day_enum` varchar(255) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_time` int(11) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `max_minimum_attendance_time` int(11) DEFAULT NULL,
  `minimum_attendance_time` int(11) DEFAULT NULL,
  `minimum_pause_duration` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `pause_booking_type_enum` varchar(255) DEFAULT NULL,
  `pause_duration` int(11) DEFAULT NULL,
  `pause_enum` varchar(255) NOT NULL,
  `start_time` int(11) DEFAULT NULL,
  `time_model2pause_time_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKwdhxywmsmvc4834r5fl8w2nd` (`time_model2pause_time_id`),
  CONSTRAINT `FKwdhxywmsmvc4834r5fl8w2nd` FOREIGN KEY (`time_model2pause_time_id`) REFERENCES `cw_time_model_2_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_model_2_pause_time_2_variant`
--


--
-- Table structure for table `cw_time_period`
--

CREATE TABLE `cw_time_period` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `absence_id` bigint(20) DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `end_date` datetime NOT NULL,
  `generated` bit(1) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `start_date` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  `extern_id` bigint(20) DEFAULT NULL,
  `homeoffice` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKohqdhn95sm7a62yo68jrf6h6g` (`absence_id`),
  KEY `FKg5q8iuxo56mvlnd2ax8hocnjo` (`person_id`),
  KEY `query1_idx` (`person_id`,`start_date`,`end_date`,`generated`,`deleted`),
  CONSTRAINT `FKg5q8iuxo56mvlnd2ax8hocnjo` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKohqdhn95sm7a62yo68jrf6h6g` FOREIGN KEY (`absence_id`) REFERENCES `cw_absence` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_period`
--


--
-- Table structure for table `cw_time_plan_2_detail`
--

CREATE TABLE `cw_time_plan_2_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `time_time_plan_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `class` varchar(255) NOT NULL,
  `position` int(11) DEFAULT NULL,
  `time_time_model_id` bigint(20) DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `week_day_enum` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKbctqj7j6gfqb2xc4c5o4x2947` (`time_time_model_id`),
  KEY `time_time_plan_idx` (`time_time_plan_id`),
  KEY `time_time_plan2_idx` (`class`,`time_time_plan_id`,`start_date`,`end_date`,`deleted`),
  CONSTRAINT `FK7t4xvmylq86nbupxh01uq53ei` FOREIGN KEY (`time_time_plan_id`) REFERENCES `cw_time_time_plan` (`id`),
  CONSTRAINT `FKbctqj7j6gfqb2xc4c5o4x2947` FOREIGN KEY (`time_time_model_id`) REFERENCES `cw_time_time_model` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_plan_2_detail`
--


--
-- Table structure for table `cw_time_specification`
--

CREATE TABLE `cw_time_specification` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) NOT NULL,
  `last_updated` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_specification`
--


--
-- Table structure for table `cw_time_specification_detail`
--

CREATE TABLE `cw_time_specification_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `default_value` bit(1) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) NOT NULL,
  `last_updated` datetime NOT NULL,
  `number` varchar(255) NOT NULL,
  `time_specification_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK350o2ln7ex4y2p4a1acldaroc` (`time_specification_id`),
  CONSTRAINT `FK350o2ln7ex4y2p4a1acldaroc` FOREIGN KEY (`time_specification_id`) REFERENCES `cw_time_specification` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_specification_detail`
--


--
-- Table structure for table `cw_time_specification_value`
--

CREATE TABLE `cw_time_specification_value` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date` datetime DEFAULT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_specification_id` bigint(20) NOT NULL,
  `time_specification_detail_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKd8f6yn5iii2hxci6incr7vmol` (`person_id`),
  KEY `FKfnpgyyssss1lgpaf7j83k66pd` (`time_specification_id`),
  KEY `FKsj73rmroes219lskp65uwm1rl` (`time_specification_detail_id`),
  CONSTRAINT `FKd8f6yn5iii2hxci6incr7vmol` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKfnpgyyssss1lgpaf7j83k66pd` FOREIGN KEY (`time_specification_id`) REFERENCES `cw_time_specification` (`id`),
  CONSTRAINT `FKsj73rmroes219lskp65uwm1rl` FOREIGN KEY (`time_specification_detail_id`) REFERENCES `cw_time_specification_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_specification_value`
--


--
-- Table structure for table `cw_time_time_manual`
--

CREATE TABLE `cw_time_time_manual` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK9tnl7vs9pxaba8pkluewn31lx` (`person_id`),
  CONSTRAINT `FK9tnl7vs9pxaba8pkluewn31lx` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_manual`
--


--
-- Table structure for table `cw_time_time_manual_2_detail`
--

CREATE TABLE `cw_time_time_manual_2_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `day_value` double NOT NULL,
  `deleted` bit(1) NOT NULL,
  `time_time_manual_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKqy0r47b9friyi81fjh2o3pdfc` (`time_time_manual_id`),
  KEY `FKp4jn0ld297qfgc8fnmx59l7ef` (`time_time_type_id`),
  CONSTRAINT `FKp4jn0ld297qfgc8fnmx59l7ef` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKqy0r47b9friyi81fjh2o3pdfc` FOREIGN KEY (`time_time_manual_id`) REFERENCES `cw_time_time_manual` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_manual_2_detail`
--


--
-- Table structure for table `cw_time_time_model`
--

CREATE TABLE `cw_time_time_model` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `calculation_program` longtext DEFAULT NULL,
  `calculation_program2` longtext DEFAULT NULL,
  `calculation_program3` longtext DEFAULT NULL,
  `calculation_program4` longtext DEFAULT NULL,
  `calculation_program5` longtext DEFAULT NULL,
  `color_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `name` varchar(255) NOT NULL,
  `short_name` varchar(255) DEFAULT NULL,
  `time_time_model_category_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `class` varchar(255) NOT NULL,
  `use_any_time` bit(1) DEFAULT NULL,
  `use_attendance_time` bit(1) DEFAULT NULL,
  `use_automatic_booking` bit(1) DEFAULT NULL,
  `use_core_working_time` bit(1) DEFAULT NULL,
  `use_fill_up_absence_time` bit(1) DEFAULT NULL,
  `use_generate_time_from_work_booking` bit(1) DEFAULT NULL,
  `use_minus_time` bit(1) DEFAULT NULL,
  `use_paid_absence_time` bit(1) DEFAULT NULL,
  `use_pause_time` bit(1) DEFAULT NULL,
  `use_permitted_coming_going` bit(1) DEFAULT NULL,
  `use_plan_time` bit(1) DEFAULT NULL,
  `use_plus_time` bit(1) DEFAULT NULL,
  `use_round_time` bit(1) DEFAULT NULL,
  `use_shift_time` bit(1) DEFAULT NULL,
  `use_too_late_time` bit(1) DEFAULT NULL,
  `use_too_soon_time` bit(1) DEFAULT NULL,
  `use_work_component_proposal` bit(1) DEFAULT NULL,
  `use_working_time` bit(1) DEFAULT NULL,
  `short_name_en` varchar(255) DEFAULT NULL,
  `use_automatic_going_booking` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKp6t9hu4newnjmr1s0rbk3ru6u` (`color_id`),
  KEY `FKkkm6pj6kx2vc7m5mbtcf9ww15` (`time_time_model_category_id`),
  CONSTRAINT `FKkkm6pj6kx2vc7m5mbtcf9ww15` FOREIGN KEY (`time_time_model_category_id`) REFERENCES `cw_time_time_model_category` (`id`),
  CONSTRAINT `FKp6t9hu4newnjmr1s0rbk3ru6u` FOREIGN KEY (`color_id`) REFERENCES `cw_color` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_model`
--

INSERT INTO `cw_time_time_model` VALUES
(1,3,'import at.clockwork.calculation.CalculationData\nimport at.clockwork.calculation.GeneralCalculationData\nimport at.clockwork.time.service.DateTimeService\nimport at.clockwork.calculation.RestartCalculationException\n\nclass Calc960Service {\n\n	static transactional = false\n\n	def run(CalculationData calculationData, GeneralCalculationData generalCalculationData, boolean saving, Map parameters) throws RestartCalculationException {\n\n	}\n\n}\n','','','','',NULL,'2018-02-07 12:31:01','\0','Ende Tag-Berechnung',NULL,'2018-02-07 12:34:31','960','',1,0,'at.clockwork.time.timeModel.domain.TimeTimeModel',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0'),
(2,3,'import at.clockwork.calculation.CalculationData\nimport at.clockwork.calculation.GeneralCalculationData\nimport at.clockwork.time.service.DateTimeService\nimport at.clockwork.calculation.RestartCalculationException\n\nclass Calc980Service {\n\n	static transactional = false\n\n	def run(CalculationData calculationData, GeneralCalculationData generalCalculationData, boolean saving, Map parameters) throws RestartCalculationException {\n\n	}\n\n}\n','','','','',NULL,'2018-02-07 12:31:12','\0','Ende Woche-Berechnung',NULL,'2018-02-07 12:34:59','980','',1,0,'at.clockwork.time.timeModel.domain.TimeTimeModel',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0'),
(3,3,'import at.clockwork.calculation.CalculationData\nimport at.clockwork.calculation.GeneralCalculationData\nimport at.clockwork.time.service.DateTimeService\nimport at.clockwork.calculation.RestartCalculationException\n\nclass Calc990Service {\n\n	static transactional = false\n\n	def run(CalculationData calculationData, GeneralCalculationData generalCalculationData, boolean saving, Map parameters) throws RestartCalculationException {\n\n	}\n\n}\n','','','','',NULL,'2018-02-07 12:31:23','\0','Ende Periode-Berechnung',NULL,'2018-02-07 12:34:43','990','',1,0,'at.clockwork.time.timeModel.domain.TimeTimeModel',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0'),
(4,1,'import at.clockwork.calculation.CalculationData\nimport at.clockwork.calculation.GeneralCalculationData\nimport at.clockwork.time.service.DateTimeService\nimport at.clockwork.calculation.RestartCalculationException\n\nclass Calc999Service {\n\n	static transactional = false\n\n	def run(CalculationData calculationData, GeneralCalculationData generalCalculationData, boolean saving, Map parameters) throws RestartCalculationException {\n\n		calculationData.run(\"960\", calculationData, generalCalculationData, saving, parameters)\n	\n		if (DateTimeService.isLastDayOfWeek(calculationData.cal))\n			calculationData.run(\"980\", calculationData, generalCalculationData, saving, parameters)\n\n		if (DateTimeService.isLastDayOfMonth(calculationData.cal))\n			calculationData.run(\"990\", calculationData, generalCalculationData, saving, parameters)\n\n//		calculationData.xValues[0] += 1\n//		calculationData.yValues[0] += 1\n//\n//		calculationData.run(\"996\", calculationData, generalCalculationData, saving, parameters)\n//\n//		// oder:\n//			\n//		if (calculationData.yValues[0] < 10)\n//			throw new RestartCalculationException(restartCalculation:new RestartCalculation(restartTimeTimeModelString:\"107\"))\n//\n//		// oder:\n//			\n//		if (calculationData.yValues[0] < 10)\n//			throw new RestartCalculationException(restartCalculation:new RestartCalculation(restart:true))\n\n	}\n\n}\n','','','','',NULL,'2018-02-07 12:32:13','\0','Systemmodell',NULL,'2018-02-07 12:33:35','999','',1,0,'at.clockwork.time.timeModel.domain.TimeTimeModel',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0'),
(5,1,'','','','','',NULL,'2018-02-07 12:41:42','\0','7:42',NULL,'2018-02-07 12:41:53','111','',1,0,'at.clockwork.time.timeModel.domain.TimeTimeModel',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0'),
(6,0,'','','','','',NULL,'2018-02-07 12:42:47','\0','Samstag',NULL,'2018-02-07 12:42:47','106','',1,0,'at.clockwork.time.timeModel.domain.TimeTimeModel',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0'),
(7,0,'','','','','',NULL,'2018-02-07 12:42:56','\0','Sonntag',NULL,'2018-02-07 12:42:56','107','',1,0,'at.clockwork.time.timeModel.domain.TimeTimeModel',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0');

--
-- Table structure for table `cw_time_time_model_2_additional_data`
--

CREATE TABLE `cw_time_time_model_2_additional_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `time_time_model_id` bigint(20) NOT NULL,
  `time_time_model_additional_data_id` bigint(20) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `info_value` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKro7ekqjmxkeo7yfxc7uklct8k` (`time_time_model_id`),
  KEY `FKdde5sv9w5ws9k7pnit5iivyu9` (`time_time_model_additional_data_id`),
  CONSTRAINT `FKdde5sv9w5ws9k7pnit5iivyu9` FOREIGN KEY (`time_time_model_additional_data_id`) REFERENCES `cw_additional_data` (`id`),
  CONSTRAINT `FKro7ekqjmxkeo7yfxc7uklct8k` FOREIGN KEY (`time_time_model_id`) REFERENCES `cw_time_time_model` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_model_2_additional_data`
--


--
-- Table structure for table `cw_time_time_model_category`
--

CREATE TABLE `cw_time_time_model_category` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_model_category`
--

INSERT INTO `cw_time_time_model_category` VALUES
(1,0,'2018-02-07 00:36:05','\0','Standard',NULL,'2018-02-07 00:36:05',0);

--
-- Table structure for table `cw_time_time_model_data`
--

CREATE TABLE `cw_time_time_model_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `assigned_time_time_model_id` bigint(20) DEFAULT NULL,
  `calculated_time_time_model_id` bigint(20) DEFAULT NULL,
  `date` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKqerork8s6ddf1abyyjeie0v0e` (`assigned_time_time_model_id`),
  KEY `FKkjphln3io5tv6y14yxdnkxmgq` (`calculated_time_time_model_id`),
  KEY `FKkd0kege5iugrr3ndri8yuyq97` (`person_id`),
  CONSTRAINT `FKkd0kege5iugrr3ndri8yuyq97` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKkjphln3io5tv6y14yxdnkxmgq` FOREIGN KEY (`calculated_time_time_model_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKqerork8s6ddf1abyyjeie0v0e` FOREIGN KEY (`assigned_time_time_model_id`) REFERENCES `cw_time_time_model` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_model_data`
--


--
-- Table structure for table `cw_time_time_model_detail`
--

CREATE TABLE `cw_time_time_model_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `time_from` int(11) DEFAULT NULL,
  `time_time_model_id` bigint(20) NOT NULL,
  `time_to` int(11) DEFAULT NULL,
  `type` int(11) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK2t0klfiqjo85dd5tmmrl5tr9y` (`time_time_model_id`),
  CONSTRAINT `FK2t0klfiqjo85dd5tmmrl5tr9y` FOREIGN KEY (`time_time_model_id`) REFERENCES `cw_time_time_model` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_model_detail`
--


--
-- Table structure for table `cw_time_time_plan`
--

CREATE TABLE `cw_time_time_plan` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `name` varchar(255) NOT NULL,
  `short_name` varchar(255) DEFAULT NULL,
  `time_time_model_friday_id` bigint(20) DEFAULT NULL,
  `time_time_model_monday_id` bigint(20) DEFAULT NULL,
  `time_time_model_saturday_id` bigint(20) DEFAULT NULL,
  `time_time_model_sunday_id` bigint(20) DEFAULT NULL,
  `time_time_model_thursday_id` bigint(20) DEFAULT NULL,
  `time_time_model_tuesday_id` bigint(20) DEFAULT NULL,
  `time_time_model_wednesday_id` bigint(20) DEFAULT NULL,
  `time_time_plan_category_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `part_time` bit(1) DEFAULT NULL,
  `employment_level_enum` varchar(255) DEFAULT NULL,
  `class` varchar(255) NOT NULL,
  `individual_time_time_model_friday_id` bigint(20) DEFAULT NULL,
  `individual_time_time_model_monday_id` bigint(20) DEFAULT NULL,
  `individual_time_time_model_saturday_id` bigint(20) DEFAULT NULL,
  `individual_time_time_model_sunday_id` bigint(20) DEFAULT NULL,
  `individual_time_time_model_thursday_id` bigint(20) DEFAULT NULL,
  `individual_time_time_model_tuesday_id` bigint(20) DEFAULT NULL,
  `individual_time_time_model_wednesday_id` bigint(20) DEFAULT NULL,
  `short_name_en` varchar(255) DEFAULT NULL,
  `weekly_working_days` int(11) DEFAULT NULL,
  `weekly_working_hours` double DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKbfg3rs41ikejmsiloopwf36bo` (`time_time_model_friday_id`),
  KEY `FKklhpwjfixsxicyy3i3wh0dy1f` (`time_time_model_monday_id`),
  KEY `FKpdn9blsoxrmtqorsa435dgdeq` (`time_time_model_saturday_id`),
  KEY `FK8dfqq1lx0i7l8nsa661f4wxc7` (`time_time_model_sunday_id`),
  KEY `FK8sentl460c9kl5avg92s1s8re` (`time_time_model_thursday_id`),
  KEY `FK4bkx2xoftbfsyp8ub3tg1ifwq` (`time_time_model_tuesday_id`),
  KEY `FKarfgqhtfv7ehr795kmkilj6j3` (`time_time_model_wednesday_id`),
  KEY `FKf5u0iy05csgqaoyx0eol0udcf` (`time_time_plan_category_id`),
  KEY `FK3yjd3fa2xg0ijj64afbvsvjld` (`individual_time_time_model_friday_id`),
  KEY `FKngqmy9cuiyykckh19cw00b3sm` (`individual_time_time_model_monday_id`),
  KEY `FK42738bue5a7lk29r1nbgunoot` (`individual_time_time_model_saturday_id`),
  KEY `FKef7uajnotllx1b3oygfwtsmfq` (`individual_time_time_model_sunday_id`),
  KEY `FKg1uhl5kse5dplit5mbmnw8vfs` (`individual_time_time_model_thursday_id`),
  KEY `FKe3nj4v8s3i7ieuy627gi4qt4o` (`individual_time_time_model_tuesday_id`),
  KEY `FKj42pupdwrwmfqhswgu6pmef2w` (`individual_time_time_model_wednesday_id`),
  CONSTRAINT `FK3yjd3fa2xg0ijj64afbvsvjld` FOREIGN KEY (`individual_time_time_model_friday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FK42738bue5a7lk29r1nbgunoot` FOREIGN KEY (`individual_time_time_model_saturday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FK4bkx2xoftbfsyp8ub3tg1ifwq` FOREIGN KEY (`time_time_model_tuesday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FK8dfqq1lx0i7l8nsa661f4wxc7` FOREIGN KEY (`time_time_model_sunday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FK8sentl460c9kl5avg92s1s8re` FOREIGN KEY (`time_time_model_thursday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKarfgqhtfv7ehr795kmkilj6j3` FOREIGN KEY (`time_time_model_wednesday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKbfg3rs41ikejmsiloopwf36bo` FOREIGN KEY (`time_time_model_friday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKe3nj4v8s3i7ieuy627gi4qt4o` FOREIGN KEY (`individual_time_time_model_tuesday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKef7uajnotllx1b3oygfwtsmfq` FOREIGN KEY (`individual_time_time_model_sunday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKf5u0iy05csgqaoyx0eol0udcf` FOREIGN KEY (`time_time_plan_category_id`) REFERENCES `cw_time_time_plan_category` (`id`),
  CONSTRAINT `FKg1uhl5kse5dplit5mbmnw8vfs` FOREIGN KEY (`individual_time_time_model_thursday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKj42pupdwrwmfqhswgu6pmef2w` FOREIGN KEY (`individual_time_time_model_wednesday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKklhpwjfixsxicyy3i3wh0dy1f` FOREIGN KEY (`time_time_model_monday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKngqmy9cuiyykckh19cw00b3sm` FOREIGN KEY (`individual_time_time_model_monday_id`) REFERENCES `cw_time_time_model` (`id`),
  CONSTRAINT `FKpdn9blsoxrmtqorsa435dgdeq` FOREIGN KEY (`time_time_model_saturday_id`) REFERENCES `cw_time_time_model` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_plan`
--

INSERT INTO `cw_time_time_plan` VALUES
(1,0,'2018-02-07 12:43:31','\0','Arbeitskalender 1',NULL,'2018-02-07 12:43:31','AK1','',5,5,6,7,5,5,5,1,0,'\0',NULL,'at.clockwork.time.timePlan.domain.TimeTimePlan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0);

--
-- Table structure for table `cw_time_time_plan_2_additional_data`
--

CREATE TABLE `cw_time_time_plan_2_additional_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `time_time_plan_id` bigint(20) NOT NULL,
  `time_time_plan_additional_data_id` bigint(20) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `info_value` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKmrfni4cm6iew64dobbw1s6xrl` (`time_time_plan_id`),
  KEY `FKr0wi8d0hjyxe3pcll28d84plv` (`time_time_plan_additional_data_id`),
  CONSTRAINT `FKmrfni4cm6iew64dobbw1s6xrl` FOREIGN KEY (`time_time_plan_id`) REFERENCES `cw_time_time_plan` (`id`),
  CONSTRAINT `FKr0wi8d0hjyxe3pcll28d84plv` FOREIGN KEY (`time_time_plan_additional_data_id`) REFERENCES `cw_additional_data` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_plan_2_additional_data`
--


--
-- Table structure for table `cw_time_time_plan_category`
--

CREATE TABLE `cw_time_time_plan_category` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_plan_category`
--

INSERT INTO `cw_time_time_plan_category` VALUES
(1,0,'2018-02-07 00:36:05','\0','Standard',NULL,'2018-02-07 00:36:05',0);

--
-- Table structure for table `cw_time_time_type`
--

CREATE TABLE `cw_time_time_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `add_to_real_time` bit(1) DEFAULT NULL,
  `approve` bit(1) DEFAULT NULL,
  `approve_all_persons` bit(1) DEFAULT NULL,
  `close_enum` varchar(255) DEFAULT NULL,
  `color_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `individual_close_day` int(11) DEFAULT NULL,
  `individual_close_month` int(11) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `number` varchar(255) DEFAULT NULL,
  `reduce_total` bit(1) DEFAULT NULL,
  `short_name` varchar(255) DEFAULT NULL,
  `show_in_validation_end_day_value` int(11) DEFAULT NULL,
  `show_in_validation_start_day_value` int(11) DEFAULT NULL,
  `time_format_enum` varchar(255) DEFAULT NULL,
  `time_time_type_category_id` bigint(20) NOT NULL,
  `time_unit_enum` varchar(255) DEFAULT NULL,
  `transfer_total_after_close` bit(1) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  `credit_in_hours` double DEFAULT NULL,
  `no_minus_time` bit(1) DEFAULT NULL,
  `short_name_en` varchar(255) DEFAULT NULL,
  `calculate` bit(1) DEFAULT NULL,
  `credit_in_days` double DEFAULT NULL,
  `full_time_days` double DEFAULT NULL,
  `full_time_hours` double DEFAULT NULL,
  `consider_at_credit` bit(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK2lfx5h1v245h1qllh4298ukov` (`color_id`),
  KEY `FK583whcxnnniirlhc5tsmdb2e` (`time_time_type_category_id`),
  KEY `number_idx` (`number`),
  CONSTRAINT `FK2lfx5h1v245h1qllh4298ukov` FOREIGN KEY (`color_id`) REFERENCES `cw_color` (`id`),
  CONSTRAINT `FK583whcxnnniirlhc5tsmdb2e` FOREIGN KEY (`time_time_type_category_id`) REFERENCES `cw_time_time_type_category` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type`
--

INSERT INTO `cw_time_time_type` VALUES
(1,0,'\0','\0','\0','YEARLY',NULL,'2018-02-07 11:38:12','\0','Istzeit',NULL,0,0,'2018-02-07 11:38:12','1','\0','Ist',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(2,0,'\0','\0','\0','YEARLY',NULL,'2018-02-07 11:38:38','\0','Sollzeit',NULL,0,0,'2018-02-07 11:38:38','2','\0','Soll',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(3,0,'','\0','\0','YEARLY',NULL,'2018-02-07 11:38:48','\0','Anwesenheit',NULL,0,0,'2018-02-07 11:38:48','5','\0','Anw',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(4,1,'\0','\0','\0','YEARLY',NULL,'2018-02-07 11:39:10','\0','Guthaben',NULL,0,0,'2018-02-07 11:40:02','9','\0','GH',0,0,'HHMM',1,'HOURS','',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(5,0,'\0','\0','\0','YEARLY',NULL,'2018-02-07 11:39:37','\0','Mehrarbeit',NULL,0,0,'2018-02-07 11:39:37','10','\0','MA',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(6,0,'\0','\0','\0','YEARLY',NULL,'2018-02-07 11:39:55','\0','50% Überstunden',NULL,0,0,'2018-02-07 11:39:55','13','\0','50%',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(7,0,'\0','\0','\0','YEARLY',NULL,'2018-02-07 11:40:14','\0','100% Überstunden',NULL,0,0,'2018-02-07 11:40:14','17','\0','100%',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(8,0,'','\0','\0','YEARLY',NULL,'2018-02-07 11:40:37','\0','Feiertag',NULL,0,0,'2018-02-07 11:40:37','30','\0','FT',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(9,0,'','\0','\0','YEARLY',NULL,'2018-02-07 11:40:48','\0','Arzt',NULL,0,0,'2018-02-07 11:40:48','31','\0','Arzt',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(10,0,'','\0','\0','YEARLY',NULL,'2018-02-07 11:40:59','\0','Krankenstand',NULL,0,0,'2018-02-07 11:40:59','32','\0','Krank',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(11,0,'','\0','\0','YEARLY',NULL,'2018-02-07 11:41:10','\0','Arbeitsunfall',NULL,0,0,'2018-02-07 11:41:10','33','\0','AU',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(12,2,'','\0','\0','YEARLY',NULL,'2018-02-07 11:41:19','\0','Urlaub',NULL,0,0,'2018-02-07 12:16:51','40','','U',0,0,'HHMM',1,'HOURS','',0,0,'\0',NULL,'\0',0,0,0,''),
(13,0,'','\0','\0','YEARLY',NULL,'2018-02-07 12:16:26','\0','Pflegeurlaub',NULL,0,0,'2018-02-07 12:16:26','41','\0','PU',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(14,0,'','\0','\0','YEARLY',NULL,'2018-02-07 12:17:09','\0','Sonderurlaub',NULL,0,0,'2018-02-07 12:17:09','42','\0','SU',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(15,0,'\0','\0','\0','YEARLY',NULL,'2018-02-07 12:17:59','\0','Zeitausgleich (Konsum)',NULL,0,0,'2018-02-07 12:17:59','39','\0','ZA',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(16,0,'\0','\0','\0','YEARLY',NULL,'2018-02-07 12:18:29','\0','Pause',NULL,0,0,'2018-02-07 12:18:29','51','\0','Pau',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(17,0,'','\0','\0','YEARLY',NULL,'2018-02-07 12:18:49','\0','Dienstweg',NULL,0,0,'2018-02-07 12:18:49','34','\0','DW',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(18,0,'','\0','\0','YEARLY',NULL,'2018-02-07 12:18:58','\0','Dienstreise',NULL,0,0,'2018-02-07 12:18:58','35','\0','DR',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(19,0,'','\0','\0','YEARLY',NULL,'2018-02-07 12:19:13','\0','Amtsweg',NULL,0,0,'2018-02-07 12:19:13','36','\0','Amt',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(20,0,'','\0','\0','YEARLY',NULL,'2018-02-07 12:19:30','\0','Fortbildung',NULL,0,0,'2018-02-07 12:19:30','37','\0','FB',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(21,0,'','\0','\0','YEARLY',NULL,'2018-02-07 12:19:42','\0','Schule',NULL,0,0,'2018-02-07 12:19:42','38','\0','SCH',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(22,0,'\0','\0','\0','YEARLY',NULL,'2018-02-07 12:35:35','\0','Kernzeitverletzung',NULL,0,0,'2018-02-07 12:35:35','8','\0','KZVL',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0'),
(23,0,'\0','\0','\0','YEARLY',NULL,'2021-12-25 22:59:15','\0','unbezahle Freizeit','',0,0,'2021-12-25 22:59:15','43','\0','unbez.FZ',0,0,'HHMM',1,'HOURS','\0',0,0,'\0',NULL,'\0',0,0,0,'\0');

--
-- Table structure for table `cw_time_time_type_2_additional_data`
--

CREATE TABLE `cw_time_time_type_2_additional_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `time_time_type_additional_data_id` bigint(20) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `info_value` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK9yhuu1ysckkn2xa8wg3qh7m4d` (`time_time_type_id`),
  KEY `FKf21b0g24sl3xlmosiikm4k0m` (`time_time_type_additional_data_id`),
  CONSTRAINT `FK9yhuu1ysckkn2xa8wg3qh7m4d` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKf21b0g24sl3xlmosiikm4k0m` FOREIGN KEY (`time_time_type_additional_data_id`) REFERENCES `cw_additional_data` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_2_additional_data`
--


--
-- Table structure for table `cw_time_time_type_2_person_type`
--

CREATE TABLE `cw_time_time_type_2_person_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `person_type_id` bigint(20) NOT NULL,
  `start_date` datetime DEFAULT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `wage_type1` varchar(255) DEFAULT NULL,
  `wage_type2` varchar(255) DEFAULT NULL,
  `wage_type_code1` varchar(8000) DEFAULT NULL,
  `wage_type_code2` varchar(8000) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKp2fc53iyh0t33ngvor6sk30g1` (`person_type_id`),
  KEY `FKcojvjvs4jktcapy6yw68dt7vc` (`time_time_type_id`),
  CONSTRAINT `FKcojvjvs4jktcapy6yw68dt7vc` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKp2fc53iyh0t33ngvor6sk30g1` FOREIGN KEY (`person_type_id`) REFERENCES `cw_person_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_2_person_type`
--


--
-- Table structure for table `cw_time_time_type_category`
--

CREATE TABLE `cw_time_time_type_category` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_category`
--

INSERT INTO `cw_time_time_type_category` VALUES
(1,0,'2018-02-07 00:36:05','\0','Standard',NULL,'2018-02-07 00:36:05',0);

--
-- Table structure for table `cw_time_time_type_data`
--

CREATE TABLE `cw_time_time_type_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `changed_period_value` double DEFAULT NULL,
  `changed_total_value` double DEFAULT NULL,
  `credit_value` double DEFAULT NULL,
  `date` datetime NOT NULL,
  `day_value` double DEFAULT NULL,
  `initial_value` double NOT NULL,
  `initialized` bit(1) NOT NULL,
  `period_value` double DEFAULT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `total_value` double DEFAULT NULL,
  `triggered` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKr1oprb0n19txsio4rem883r7n` (`time_time_type_id`),
  KEY `query3_idx` (`person_id`,`time_time_type_id`,`date`),
  CONSTRAINT `FK8ei6u9b6tpc7hihg2tuh6vpyx` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKr1oprb0n19txsio4rem883r7n` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_data`
--

INSERT INTO `cw_time_time_type_data` VALUES
(1,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,1,0,'\0'),
(2,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,2,0,'\0'),
(3,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,3,0,'\0'),
(4,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,4,0,'\0'),
(5,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,5,0,'\0'),
(6,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,6,0,'\0'),
(7,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,7,0,'\0'),
(8,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,8,0,'\0'),
(9,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,9,0,'\0'),
(10,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,10,0,'\0'),
(11,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,11,0,'\0'),
(12,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,12,0,'\0'),
(13,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,13,0,'\0'),
(14,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,14,0,'\0'),
(15,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,15,0,'\0'),
(16,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,16,0,'\0'),
(17,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,17,0,'\0'),
(18,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,18,0,'\0'),
(19,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,19,0,'\0'),
(20,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,20,0,'\0'),
(21,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,21,0,'\0'),
(22,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,22,0,'\0'),
(23,0,0,0,0,'2000-01-01 00:00:00',0,0,'\0',0,1,23,0,'\0');

--
-- Table structure for table `cw_time_time_type_data_approval`
--

CREATE TABLE `cw_time_time_type_data_approval` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `approved_by_id` bigint(20) DEFAULT NULL,
  `approved_value` double DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `disapproved_value` double DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `open_value` double NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKevc39on8x0wdgcm90wbg9dvm4` (`approved_by_id`),
  KEY `FKpfdyobm0kvf1wcam9nmrjspul` (`person_id`),
  KEY `FK26b48e0wxwsp1qg42owpvgqbb` (`time_time_type_id`),
  CONSTRAINT `FK26b48e0wxwsp1qg42owpvgqbb` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKevc39on8x0wdgcm90wbg9dvm4` FOREIGN KEY (`approved_by_id`) REFERENCES `cw_user` (`id`),
  CONSTRAINT `FKpfdyobm0kvf1wcam9nmrjspul` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_data_approval`
--


--
-- Table structure for table `cw_time_time_type_data_credit`
--

CREATE TABLE `cw_time_time_type_data_credit` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `credit_value` double DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKjli58959r8muf36w1gyciowhr` (`time_time_type_id`),
  KEY `query1_idx` (`person_id`,`time_time_type_id`,`date`,`deleted`),
  CONSTRAINT `FKjli58959r8muf36w1gyciowhr` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKsrrrq3rp7khkitwdo1ec5yfma` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_data_credit`
--


--
-- Table structure for table `cw_time_time_type_data_initial`
--

CREATE TABLE `cw_time_time_type_data_initial` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `initial_value` double DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKjj2sc9njv0vy6wxcqmmh9hq2i` (`time_time_type_id`),
  KEY `query1_idx` (`person_id`,`time_time_type_id`,`date`,`deleted`),
  CONSTRAINT `FKjc7lx49ny9ece31vka5jkdnpd` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKjj2sc9njv0vy6wxcqmmh9hq2i` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_data_initial`
--


--
-- Table structure for table `cw_time_time_type_data_limit`
--

CREATE TABLE `cw_time_time_type_data_limit` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date` datetime NOT NULL,
  `limit_value` double DEFAULT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK5dmysne1nyxyfnru7mfxp716e` (`person_id`),
  KEY `FK10jnlt2316ct7femacvptbrsi` (`time_time_type_id`),
  CONSTRAINT `FK10jnlt2316ct7femacvptbrsi` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FK5dmysne1nyxyfnru7mfxp716e` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_data_limit`
--


--
-- Table structure for table `cw_time_time_type_data_rewind`
--

CREATE TABLE `cw_time_time_type_data_rewind` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `value1` double NOT NULL,
  `value2` double NOT NULL,
  `value3` double NOT NULL,
  `value4` double NOT NULL,
  `value5` double NOT NULL,
  `wage_type_number` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKf3lkyhb5kp5nw059i3t5m4nof` (`person_id`),
  KEY `FKtjobiarnjjd2695x4ga77b5tm` (`time_time_type_id`),
  CONSTRAINT `FKf3lkyhb5kp5nw059i3t5m4nof` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKtjobiarnjjd2695x4ga77b5tm` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_data_rewind`
--


--
-- Table structure for table `cw_time_time_type_data_total`
--

CREATE TABLE `cw_time_time_type_data_total` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `total_value` double DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK10v16htiqgt20wausv9ks2y62` (`person_id`),
  KEY `FKh1pxmapapry8sntre1xgkvw73` (`time_time_type_id`),
  CONSTRAINT `FK10v16htiqgt20wausv9ks2y62` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKh1pxmapapry8sntre1xgkvw73` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_data_total`
--


--
-- Table structure for table `cw_time_time_type_data_transfer`
--

CREATE TABLE `cw_time_time_type_data_transfer` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `time_time_type_minus1_id` bigint(20) DEFAULT NULL,
  `time_time_type_minus2_id` bigint(20) DEFAULT NULL,
  `time_time_type_plus1_id` bigint(20) DEFAULT NULL,
  `time_time_type_plus2_id` bigint(20) DEFAULT NULL,
  `time_transfer_minus1enum` varchar(255) DEFAULT NULL,
  `time_transfer_minus2enum` varchar(255) DEFAULT NULL,
  `time_transfer_plus1enum` varchar(255) DEFAULT NULL,
  `time_transfer_plus2enum` varchar(255) DEFAULT NULL,
  `transfer_value` double DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  `time_time_type_data_transfer_enum` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK29cothjr8mwhpyrkgiwiaa4dn` (`person_id`),
  KEY `FKbx4nhvesfkshxtpugqihgqgdv` (`time_time_type_minus1_id`),
  KEY `FK841saxkumh3sq8chciwbxugnm` (`time_time_type_minus2_id`),
  KEY `FK7pyifavdvgqjx3m6kj845s2w4` (`time_time_type_plus1_id`),
  KEY `FKkxnoojmqh8qh77owpboid2lhx` (`time_time_type_plus2_id`),
  CONSTRAINT `FK29cothjr8mwhpyrkgiwiaa4dn` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FK7pyifavdvgqjx3m6kj845s2w4` FOREIGN KEY (`time_time_type_plus1_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FK841saxkumh3sq8chciwbxugnm` FOREIGN KEY (`time_time_type_minus2_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKbx4nhvesfkshxtpugqihgqgdv` FOREIGN KEY (`time_time_type_minus1_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKkxnoojmqh8qh77owpboid2lhx` FOREIGN KEY (`time_time_type_plus2_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_data_transfer`
--


--
-- Table structure for table `cw_time_time_type_definition`
--

CREATE TABLE `cw_time_time_type_definition` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_definition`
--

INSERT INTO `cw_time_time_type_definition` VALUES
(1,0,'\0','Buchungen','1','Buchungen'),
(2,0,'\0','Bericht Hochformat','2','Bericht Hochformat'),
(3,0,'\0','Bericht Querformat','3','Bericht Querformat'),
(4,0,'\0','Abwesenheitsübersicht','4','Abwesenheitsübersicht');

--
-- Table structure for table `cw_time_time_type_definition_detail`
--

CREATE TABLE `cw_time_time_type_definition_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `position` int(11) NOT NULL,
  `script_id` bigint(20) DEFAULT NULL,
  `script_code` longtext DEFAULT NULL,
  `time_calculation` varchar(255) DEFAULT NULL,
  `time_duration` varchar(255) DEFAULT NULL,
  `time_duration_in_relation_to` varchar(255) DEFAULT NULL,
  `time_format_enum` varchar(255) DEFAULT NULL,
  `time_time_type_id` bigint(20) DEFAULT NULL,
  `time_time_type_definition_id` bigint(20) NOT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `time_time_type_data_field_enum` varchar(255) DEFAULT NULL,
  `work_time_type_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK3i736m5niohgd1j2m6vuhg2es` (`script_id`),
  KEY `FK3xgd6mqulr0h5jk0y83rkoesd` (`time_time_type_id`),
  KEY `FK42ybww1tk3m6i7w0ehd52vrh4` (`time_time_type_definition_id`),
  KEY `FKjf4d0ounw9c8t58ya19td4dba` (`work_time_type_id`),
  CONSTRAINT `FK3i736m5niohgd1j2m6vuhg2es` FOREIGN KEY (`script_id`) REFERENCES `cw_script` (`id`),
  CONSTRAINT `FK3xgd6mqulr0h5jk0y83rkoesd` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FK42ybww1tk3m6i7w0ehd52vrh4` FOREIGN KEY (`time_time_type_definition_id`) REFERENCES `cw_time_time_type_definition` (`id`),
  CONSTRAINT `FKjf4d0ounw9c8t58ya19td4dba` FOREIGN KEY (`work_time_type_id`) REFERENCES `cw_work_time_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_definition_detail`
--

INSERT INTO `cw_time_time_type_definition_detail` VALUES
(1,0,'\0','Ist',1,NULL,NULL,NULL,NULL,NULL,NULL,1,1,'Ist',NULL,NULL),
(2,0,'\0','Soll',2,NULL,NULL,NULL,NULL,NULL,NULL,2,1,'Soll',NULL,NULL),
(3,0,'\0','Anw',3,NULL,NULL,NULL,NULL,NULL,NULL,3,1,'Anw',NULL,NULL),
(4,0,'\0','GH',4,NULL,NULL,NULL,NULL,NULL,NULL,4,1,'GH',NULL,NULL),
(5,0,'\0','Arzt',1,NULL,NULL,NULL,NULL,NULL,NULL,9,4,'Arzt',NULL,NULL),
(6,0,'\0','K',2,NULL,NULL,NULL,NULL,NULL,NULL,10,4,'K',NULL,NULL),
(7,0,'\0','AU',3,NULL,NULL,NULL,NULL,NULL,NULL,11,4,'AU',NULL,NULL),
(8,0,'\0','ZA',4,NULL,NULL,NULL,NULL,NULL,NULL,15,4,'ZA',NULL,NULL),
(9,0,'\0','U',5,NULL,NULL,NULL,NULL,NULL,NULL,12,4,'U',NULL,NULL),
(10,0,'\0','PU',6,NULL,NULL,NULL,NULL,NULL,NULL,13,4,'PU',NULL,NULL),
(11,0,'\0','SU',7,NULL,NULL,NULL,NULL,NULL,NULL,14,4,'SU',NULL,NULL),
(12,0,'\0','Ist',1,NULL,NULL,NULL,NULL,NULL,NULL,1,2,'Ist',NULL,NULL),
(13,0,'\0','Soll',2,NULL,NULL,NULL,NULL,NULL,NULL,2,2,'Soll',NULL,NULL),
(14,0,'\0','Anw',3,NULL,NULL,NULL,NULL,NULL,NULL,3,2,'Anw',NULL,NULL),
(15,0,'\0','GH',4,NULL,NULL,NULL,NULL,NULL,NULL,4,2,'GH',NULL,NULL),
(16,0,'\0','Arzt',5,NULL,NULL,NULL,NULL,NULL,NULL,9,2,'Arzt',NULL,NULL),
(17,0,'\0','K',6,NULL,NULL,NULL,NULL,NULL,NULL,10,2,'K',NULL,NULL),
(18,0,'\0','AU',7,NULL,NULL,NULL,NULL,NULL,NULL,11,2,'AU',NULL,NULL),
(19,0,'\0','U',8,NULL,NULL,NULL,NULL,NULL,NULL,12,2,'U',NULL,NULL),
(20,0,'\0','PU',9,NULL,NULL,NULL,NULL,NULL,NULL,13,2,'PU',NULL,NULL),
(21,0,'\0','SU',10,NULL,NULL,NULL,NULL,NULL,NULL,14,2,'SU',NULL,NULL);

--
-- Table structure for table `cw_time_time_type_definition_detail_cw_time_time_type`
--

CREATE TABLE `cw_time_time_type_definition_detail_cw_time_time_type` (
  `time_time_type_definition_detail_time_time_types_id` bigint(20) NOT NULL,
  `time_time_type_id` bigint(20) DEFAULT NULL,
  KEY `FKthm1pm2batgbbhrkdo6ye8pvs` (`time_time_type_id`),
  KEY `FKsdwoqqeiponmlfxcmq9h0a3xu` (`time_time_type_definition_detail_time_time_types_id`),
  CONSTRAINT `FKsdwoqqeiponmlfxcmq9h0a3xu` FOREIGN KEY (`time_time_type_definition_detail_time_time_types_id`) REFERENCES `cw_time_time_type_definition_detail` (`id`),
  CONSTRAINT `FKthm1pm2batgbbhrkdo6ye8pvs` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_time_type_definition_detail_cw_time_time_type`
--


--
-- Table structure for table `cw_time_transfer`
--

CREATE TABLE `cw_time_transfer` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK8284vpnb7r8sr5kx1trhb3ao7` (`person_id`),
  CONSTRAINT `FK8284vpnb7r8sr5kx1trhb3ao7` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_transfer`
--


--
-- Table structure for table `cw_time_transfer_cw_time_transfer_detail`
--

CREATE TABLE `cw_time_transfer_cw_time_transfer_detail` (
  `time_transfer_time_transfer_details_id` bigint(20) NOT NULL,
  `time_transfer_detail_id` bigint(20) DEFAULT NULL,
  KEY `FK3m0ydo8wo54i53w69oc6esvcj` (`time_transfer_detail_id`),
  KEY `FK3btgc4250pytvmdh6gsccgnyx` (`time_transfer_time_transfer_details_id`),
  CONSTRAINT `FK3btgc4250pytvmdh6gsccgnyx` FOREIGN KEY (`time_transfer_time_transfer_details_id`) REFERENCES `cw_time_transfer` (`id`),
  CONSTRAINT `FK3m0ydo8wo54i53w69oc6esvcj` FOREIGN KEY (`time_transfer_detail_id`) REFERENCES `cw_time_transfer_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_transfer_cw_time_transfer_detail`
--


--
-- Table structure for table `cw_time_transfer_detail`
--

CREATE TABLE `cw_time_transfer_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `math_operator` varchar(255) DEFAULT NULL,
  `time_oriented` varchar(255) NOT NULL,
  `time_time_type_id` bigint(20) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `value` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKc04bqve67xoyam8x6jc65x6h8` (`time_time_type_id`),
  CONSTRAINT `FKc04bqve67xoyam8x6jc65x6h8` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_time_transfer_detail`
--


--
-- Table structure for table `cw_tmc_additional_person_authorisation_type`
--

CREATE TABLE `cw_tmc_additional_person_authorisation_type` (
  `id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_tmc_additional_person_authorisation_type`
--

INSERT INTO `cw_tmc_additional_person_authorisation_type` VALUES
(4);

--
-- Table structure for table `cw_tmc_person_access_authorisation`
--

CREATE TABLE `cw_tmc_person_access_authorisation` (
  `id` bigint(20) NOT NULL,
  `person_access_schedule_id` bigint(20) DEFAULT NULL,
  `additional_person_authorisation_type_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKo4l8ow33gjfvlsolfksmrmec7` (`person_access_schedule_id`),
  KEY `FKf7xlppww679it7368n9g7xtoo` (`additional_person_authorisation_type_id`),
  CONSTRAINT `FKf7xlppww679it7368n9g7xtoo` FOREIGN KEY (`additional_person_authorisation_type_id`) REFERENCES `cw_tmc_additional_person_authorisation_type` (`id`),
  CONSTRAINT `FKo4l8ow33gjfvlsolfksmrmec7` FOREIGN KEY (`person_access_schedule_id`) REFERENCES `cw_tmc_person_access_schedule` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_tmc_person_access_authorisation`
--


--
-- Table structure for table `cw_tmc_person_access_schedule`
--

CREATE TABLE `cw_tmc_person_access_schedule` (
  `id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_tmc_person_access_schedule`
--


--
-- Table structure for table `cw_tmc_person_category_access_authorisation`
--

CREATE TABLE `cw_tmc_person_category_access_authorisation` (
  `id` bigint(20) NOT NULL,
  `person_access_schedule_id` bigint(20) DEFAULT NULL,
  `additional_person_authorisation_type_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKfxwojmtajqgw3ijb2c75uoenp` (`person_access_schedule_id`),
  KEY `FKqu8t3p5e2q3v1q67bhtq0jbpx` (`additional_person_authorisation_type_id`),
  CONSTRAINT `FKfxwojmtajqgw3ijb2c75uoenp` FOREIGN KEY (`person_access_schedule_id`) REFERENCES `cw_tmc_person_access_schedule` (`id`),
  CONSTRAINT `FKqu8t3p5e2q3v1q67bhtq0jbpx` FOREIGN KEY (`additional_person_authorisation_type_id`) REFERENCES `cw_tmc_additional_person_authorisation_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_tmc_person_category_access_authorisation`
--


--
-- Table structure for table `cw_tmcfile`
--

CREATE TABLE `cw_tmcfile` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `file_upload_id` bigint(20) NOT NULL,
  `last_updated` datetime NOT NULL,
  `tmc_filename` varchar(255) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKjuuixf8457u7e1ed1th0add7k` (`file_upload_id`),
  CONSTRAINT `FKjuuixf8457u7e1ed1th0add7k` FOREIGN KEY (`file_upload_id`) REFERENCES `file_upload` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_tmcfile`
--


--
-- Table structure for table `cw_too_late`
--

CREATE TABLE `cw_too_late` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_time` int(11) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `start_time` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKldmxmlkq41263fb8rty5t9qtw` (`person_id`),
  CONSTRAINT `FKldmxmlkq41263fb8rty5t9qtw` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_too_late`
--


--
-- Table structure for table `cw_too_soon`
--

CREATE TABLE `cw_too_soon` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_time` int(11) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `start_time` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKmx7895ecjogxxmvdxigdfu68y` (`person_id`),
  CONSTRAINT `FKmx7895ecjogxxmvdxigdfu68y` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_too_soon`
--


--
-- Table structure for table `cw_training`
--

CREATE TABLE `cw_training` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `name` varchar(255) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `url` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_training`
--


--
-- Table structure for table `cw_trigger`
--

CREATE TABLE `cw_trigger` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `cron_definition` varchar(255) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `detail1` varchar(255) DEFAULT NULL,
  `job_start_type_enum` varchar(255) NOT NULL,
  `last_updated` datetime NOT NULL,
  `name` varchar(255) NOT NULL,
  `trigger_type_enum` varchar(255) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `reportemail_type_id` bigint(20) DEFAULT NULL,
  `report_end_date_code` longtext DEFAULT NULL,
  `report_export_format_enum` varchar(255) DEFAULT NULL,
  `report_general_validation_user_id` bigint(20) DEFAULT NULL,
  `report_printer_name` varchar(255) DEFAULT NULL,
  `report_start_date_code` longtext DEFAULT NULL,
  `script_id` bigint(20) DEFAULT NULL,
  `import_booking_file_id` bigint(20) DEFAULT NULL,
  `report_use_user2operator_type` bit(1) DEFAULT NULL,
  `general_validation_id` bigint(20) DEFAULT NULL,
  `trigger_start_delay` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_gn0a479jplwse7t9p38es1jnl` (`name`),
  KEY `FKrfessn9j8vyg40jsadcgyub1q` (`reportemail_type_id`),
  KEY `FKe01uis3qs8eu879vwwcpjn03x` (`report_general_validation_user_id`),
  KEY `FKgr5b82wi282iqcj6f6bqwolwq` (`script_id`),
  KEY `FK2r1bw34v5aigb151xqtqaxiq1` (`import_booking_file_id`),
  KEY `FKp6hk24un37xsgmfvpa20xwmhi` (`general_validation_id`),
  CONSTRAINT `FK2r1bw34v5aigb151xqtqaxiq1` FOREIGN KEY (`import_booking_file_id`) REFERENCES `cw_import_booking_file` (`id`),
  CONSTRAINT `FKe01uis3qs8eu879vwwcpjn03x` FOREIGN KEY (`report_general_validation_user_id`) REFERENCES `cw_general_validation` (`id`),
  CONSTRAINT `FKgr5b82wi282iqcj6f6bqwolwq` FOREIGN KEY (`script_id`) REFERENCES `cw_script` (`id`),
  CONSTRAINT `FKp6hk24un37xsgmfvpa20xwmhi` FOREIGN KEY (`general_validation_id`) REFERENCES `cw_general_validation` (`id`),
  CONSTRAINT `FKrfessn9j8vyg40jsadcgyub1q` FOREIGN KEY (`reportemail_type_id`) REFERENCES `cw_email_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger`
--

INSERT INTO `cw_trigger` VALUES
(1,0,'0/2 * * * * ?','2018-02-07 12:55:24','\0','Aktionen ausführen','','MANUAL','2018-02-07 12:55:24','Aktionen','EXECUTE_ACTION',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0',NULL,0),
(2,0,'0 * * * * ?','2018-02-07 12:55:47','\0','Daten auslesen','','MANUAL','2018-02-07 12:55:47','Auslesen','READ_DATA',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0',NULL,0),
(3,0,'0 0 4 * * ?','2018-02-07 12:56:07','\0','Berechnung durchführen','','MANUAL','2018-02-07 12:56:07','Berechnung','CALCULATE_TIME_ATTENDANCE',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0',NULL,0),
(4,0,'15 0 4 * * ?','2018-02-07 12:56:35','\0','Datum/Zeit setzen','','MANUAL','2018-02-07 12:56:35','Datum/Zeit','SET_DATE_TIME_IN_TERMINALS',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'\0',NULL,0),
(5,0,'0/15 * * * * ?','2022-07-02 01:17:35','\0','Emails senden','','MANUAL','2022-07-02 01:17:35','Emails','SEND_EMAIL',0,NULL,'',NULL,NULL,'','',NULL,NULL,'\0',NULL,0),
(6,0,'0 0 0 * * ?','2022-07-02 01:18:06','\0','Init Ids','','MANUAL','2022-07-02 01:18:06','InitID','INITIALIZE_ID_DATA',0,NULL,'',NULL,NULL,'','',NULL,NULL,'\0',NULL,0),
(7,2,'0 0 2 * * ?','2022-12-22 11:19:37','\0','Delete Log Communication','14','MANUAL','2023-01-18 01:14:01','DeleteLogCommunication','DELETE_LOG_COMMUNICATION',0,NULL,'',NULL,NULL,'','',NULL,NULL,'\0',NULL,0),
(8,4,'0 5 2 * * ?','2022-12-22 11:20:04','\0','Delete Log Trigger','14','MANUAL','2023-01-18 01:14:21','DeleteLogTrigger','DELETE_LOG_TRIGGER',0,NULL,'',NULL,NULL,'','',NULL,NULL,'\0',NULL,0),
(9,3,'0 10 2 * * ?','2022-12-22 11:20:56','\0','Delete Terminal Communication','14','MANUAL','2023-01-18 01:14:28','DeleteTerminalCommunication','DELETE_TERMINAL_COMMUNICATION',0,NULL,'',NULL,NULL,'','',NULL,NULL,'\0',NULL,0),
(11,0,'0/10 * * * * ?','2024-03-08 08:23:11','\0','Foxprodaten synchronisieren','','MANUAL','2024-03-08 08:23:11','FoxproSync','SYNCHRONIZE_WITH_CLOCKWORK_FOXPRO',0,NULL,'',NULL,NULL,'','',NULL,NULL,'\0',NULL,0),
(12,0,'0 0 4 * * ?','2024-03-08 08:23:55','\0','Terminals aktualisieren','','MANUAL','2024-03-08 08:23:55','UpdateTerminals','UPDATE_TERMINALS',0,NULL,'',NULL,NULL,'','',NULL,NULL,'\0',NULL,0);

--
-- Table structure for table `cw_trigger_2_operator_type`
--

CREATE TABLE `cw_trigger_2_operator_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `general_validation_id` bigint(20) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `operator_type_id` bigint(20) NOT NULL,
  `person_category_id` bigint(20) DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `trigger_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKff56d4r09s34hruylwo739sgg` (`general_validation_id`),
  KEY `FKji6xi9th9ihvtkjl5ch7lenu5` (`operator_type_id`),
  KEY `FKrl2djbnlb89nkrhng70pn70jp` (`person_category_id`),
  KEY `FKfxctqlux9n19xo4bl87umlnqf` (`trigger_id`),
  CONSTRAINT `FKff56d4r09s34hruylwo739sgg` FOREIGN KEY (`general_validation_id`) REFERENCES `cw_general_validation` (`id`),
  CONSTRAINT `FKfxctqlux9n19xo4bl87umlnqf` FOREIGN KEY (`trigger_id`) REFERENCES `cw_trigger` (`id`),
  CONSTRAINT `FKji6xi9th9ihvtkjl5ch7lenu5` FOREIGN KEY (`operator_type_id`) REFERENCES `cw_operator_type` (`id`),
  CONSTRAINT `FKrl2djbnlb89nkrhng70pn70jp` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_2_operator_type`
--


--
-- Table structure for table `cw_trigger_2_operator_type_2_person_bl`
--

CREATE TABLE `cw_trigger_2_operator_type_2_person_bl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `trigger2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK1x6bc1pbfmulb850xcyl1bsyu` (`person_id`),
  KEY `FK4gevf46ojeva7g13hg6g4ujd9` (`trigger2operator_type_id`),
  CONSTRAINT `FK1x6bc1pbfmulb850xcyl1bsyu` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FK4gevf46ojeva7g13hg6g4ujd9` FOREIGN KEY (`trigger2operator_type_id`) REFERENCES `cw_trigger_2_operator_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_2_operator_type_2_person_bl`
--


--
-- Table structure for table `cw_trigger_2_operator_type_2_person_category_bl`
--

CREATE TABLE `cw_trigger_2_operator_type_2_person_category_bl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_category_id` bigint(20) NOT NULL,
  `trigger2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK4jxfnjbilvvxmvrvi6erck81y` (`person_category_id`),
  KEY `FKcaus62whiitv3svq0nrov10bi` (`trigger2operator_type_id`),
  CONSTRAINT `FK4jxfnjbilvvxmvrvi6erck81y` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`),
  CONSTRAINT `FKcaus62whiitv3svq0nrov10bi` FOREIGN KEY (`trigger2operator_type_id`) REFERENCES `cw_trigger_2_operator_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_2_operator_type_2_person_category_bl`
--


--
-- Table structure for table `cw_trigger_2_operator_type_2_person_category_wl`
--

CREATE TABLE `cw_trigger_2_operator_type_2_person_category_wl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_category_id` bigint(20) NOT NULL,
  `trigger2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKspxv4cvni2jqmxievhss4k6ya` (`person_category_id`),
  KEY `FKf22dtuo1md6srli152it1mb15` (`trigger2operator_type_id`),
  CONSTRAINT `FKf22dtuo1md6srli152it1mb15` FOREIGN KEY (`trigger2operator_type_id`) REFERENCES `cw_trigger_2_operator_type` (`id`),
  CONSTRAINT `FKspxv4cvni2jqmxievhss4k6ya` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_2_operator_type_2_person_category_wl`
--


--
-- Table structure for table `cw_trigger_2_operator_type_2_person_wl`
--

CREATE TABLE `cw_trigger_2_operator_type_2_person_wl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `trigger2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK7hctu8qknqsv6jteob7ap0doo` (`person_id`),
  KEY `FK68olnd12ti3ptqsr8q5xp8u1b` (`trigger2operator_type_id`),
  CONSTRAINT `FK68olnd12ti3ptqsr8q5xp8u1b` FOREIGN KEY (`trigger2operator_type_id`) REFERENCES `cw_trigger_2_operator_type` (`id`),
  CONSTRAINT `FK7hctu8qknqsv6jteob7ap0doo` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_2_operator_type_2_person_wl`
--


--
-- Table structure for table `cw_trigger_report_2_operator_type`
--

CREATE TABLE `cw_trigger_report_2_operator_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `general_validation_id` bigint(20) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `operator_type_id` bigint(20) NOT NULL,
  `person_category_id` bigint(20) DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `trigger_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKd800oal0v7qpyt1l7uxhq2vd3` (`general_validation_id`),
  KEY `FKa6q2f6ihrxqefcy3poe0mpevd` (`operator_type_id`),
  KEY `FKr79on30tb496cvbniddojb5j3` (`person_category_id`),
  KEY `FK5cgbcsxwdu4m37nrowy6c4vst` (`trigger_id`),
  CONSTRAINT `FK5cgbcsxwdu4m37nrowy6c4vst` FOREIGN KEY (`trigger_id`) REFERENCES `cw_trigger` (`id`),
  CONSTRAINT `FKa6q2f6ihrxqefcy3poe0mpevd` FOREIGN KEY (`operator_type_id`) REFERENCES `cw_operator_type` (`id`),
  CONSTRAINT `FKd800oal0v7qpyt1l7uxhq2vd3` FOREIGN KEY (`general_validation_id`) REFERENCES `cw_general_validation` (`id`),
  CONSTRAINT `FKr79on30tb496cvbniddojb5j3` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_report_2_operator_type`
--


--
-- Table structure for table `cw_trigger_report_2_operator_type_2_person_bl`
--

CREATE TABLE `cw_trigger_report_2_operator_type_2_person_bl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `trigger_report2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKfxqwqrhko3wfyeid2cacw3spo` (`person_id`),
  KEY `FKa8ipdvmuhiy4qv659p90id6qb` (`trigger_report2operator_type_id`),
  CONSTRAINT `FKa8ipdvmuhiy4qv659p90id6qb` FOREIGN KEY (`trigger_report2operator_type_id`) REFERENCES `cw_trigger_report_2_operator_type` (`id`),
  CONSTRAINT `FKfxqwqrhko3wfyeid2cacw3spo` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_report_2_operator_type_2_person_bl`
--


--
-- Table structure for table `cw_trigger_report_2_operator_type_2_person_category_bl`
--

CREATE TABLE `cw_trigger_report_2_operator_type_2_person_category_bl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_category_id` bigint(20) NOT NULL,
  `trigger_report2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK1caqiu7rxfhf1di2u4cjt29cf` (`person_category_id`),
  KEY `FK6np9pukh6f4eaficbj1ynugob` (`trigger_report2operator_type_id`),
  CONSTRAINT `FK1caqiu7rxfhf1di2u4cjt29cf` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`),
  CONSTRAINT `FK6np9pukh6f4eaficbj1ynugob` FOREIGN KEY (`trigger_report2operator_type_id`) REFERENCES `cw_trigger_report_2_operator_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_report_2_operator_type_2_person_category_bl`
--


--
-- Table structure for table `cw_trigger_report_2_operator_type_2_person_category_wl`
--

CREATE TABLE `cw_trigger_report_2_operator_type_2_person_category_wl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_category_id` bigint(20) NOT NULL,
  `trigger_report2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKjx0his5ld40je7u4v0q0nwtv8` (`person_category_id`),
  KEY `FKpf83guswjxioglgpv0j3p1dhj` (`trigger_report2operator_type_id`),
  CONSTRAINT `FKjx0his5ld40je7u4v0q0nwtv8` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`),
  CONSTRAINT `FKpf83guswjxioglgpv0j3p1dhj` FOREIGN KEY (`trigger_report2operator_type_id`) REFERENCES `cw_trigger_report_2_operator_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_report_2_operator_type_2_person_category_wl`
--


--
-- Table structure for table `cw_trigger_report_2_operator_type_2_person_wl`
--

CREATE TABLE `cw_trigger_report_2_operator_type_2_person_wl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `trigger_report2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKj0i6wvmd0n5eo74rwxqftkgjh` (`person_id`),
  KEY `FKo6yaq3uc2krg370dnqgfd2vxv` (`trigger_report2operator_type_id`),
  CONSTRAINT `FKj0i6wvmd0n5eo74rwxqftkgjh` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKo6yaq3uc2krg370dnqgfd2vxv` FOREIGN KEY (`trigger_report2operator_type_id`) REFERENCES `cw_trigger_report_2_operator_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_trigger_report_2_operator_type_2_person_wl`
--


--
-- Table structure for table `cw_uart`
--

CREATE TABLE `cw_uart` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `baudrate` int(11) NOT NULL,
  `databits` int(11) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) NOT NULL,
  `last_updated` datetime NOT NULL,
  `parity` varchar(255) NOT NULL,
  `stopbits` int(11) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_uart`
--

INSERT INTO `cw_uart` VALUES
(1,0,9600,8,'2021-12-25 23:40:26','\0','9600,E,8,1','2021-12-25 23:40:26','E',1,0);

--
-- Table structure for table `cw_update`
--

CREATE TABLE `cw_update` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `condition_command` longtext DEFAULT NULL,
  `condition_script` longtext DEFAULT NULL,
  `cw_id` int(11) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `done` bit(1) NOT NULL,
  `executed` datetime DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `message` varchar(255) DEFAULT NULL,
  `mssqlcommand` longtext DEFAULT NULL,
  `mysqlcommand` longtext DEFAULT NULL,
  `cw_order` int(11) DEFAULT NULL,
  `result` varchar(255) DEFAULT NULL,
  `update_command` longtext DEFAULT NULL,
  `update_script` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1328 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_update`
--

INSERT INTO `cw_update` VALUES
(1,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_text\', \'english\')','',1,'2018-02-07 00:35:55','\0','init cw_text.text_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_text set text_en = english','update cw_text set text_en = english',0,'condition is false','',''),
(2,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_text\', \'english\')','',2,'2018-02-07 00:35:55','\0','drop cw_text.entlish','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_text drop column english','alter table cw_text drop column english',0,'condition is false','',''),
(3,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_text\', \'german\')','',3,'2018-02-07 00:35:55','\0','init cw_text.text_de','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_text set text_de = german','update cw_text set text_de = german',0,'condition is false','',''),
(4,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_text\', \'german\')','',4,'2018-02-07 00:35:55','\0','drop cw_text.german','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_text drop column german','alter table cw_text drop column german',0,'condition is false','',''),
(5,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'description\')','',5,'2018-02-07 00:35:55','\0','init cw_time_time_type.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_time_time_type set description_de = description, description_en = description','update cw_time_time_type set description_de = description, description_en = description',0,'condition is false','',''),
(6,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'description\')','',6,'2018-02-07 00:35:55','\0','drop cw_time_time_type.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_time_time_type drop column description','alter table cw_time_time_type drop column description',0,'condition is false','',''),
(7,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_model\', \'description\')','',7,'2018-02-07 00:35:55','\0','init cw_time_time_model.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_time_time_model set description_de = description, description_en = description','update cw_time_time_model set description_de = description, description_en = description',0,'condition is false','',''),
(8,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_model\', \'description\')','',8,'2018-02-07 00:35:55','\0','drop cw_time_time_model.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_time_time_model drop column description','alter table cw_time_time_model drop column description',0,'condition is false','',''),
(9,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'description\')','',9,'2018-02-07 00:35:55','\0','init cw_time_time_plan.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','drop cw_time_time_plan.description','update cw_time_time_plan set description_de = description, description_en = description','update cw_time_time_plan set description_de = description, description_en = description',0,'condition is false','',''),
(10,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'description\')','',10,'2018-02-07 00:35:55','\0','drop cw_time_time_plan.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_time_time_plan drop column description','alter table cw_time_time_plan drop column description',0,'condition is false','',''),
(11,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'description\')','',11,'2018-02-07 00:35:55','\0','init cw_absence.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_absence set description_de = description, description_en = description','update cw_absence set description_de = description, description_en = description',0,'condition is false','',''),
(12,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'description\')','',12,'2018-02-07 00:35:55','\0','drop cw_absence.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_absence drop column description','alter table cw_absence drop column description',0,'condition is false','',''),
(13,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence_category\', \'description\')','',13,'2018-02-07 00:35:55','\0','init cw_absence_category.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_absence_category set description_de = description, description_en = description','update cw_absence_category set description_de = description, description_en = description',0,'condition is false','',''),
(14,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence_category\', \'description\')','',14,'2018-02-07 00:35:55','\0','drop cw_absence_category.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_absence_category drop column description','alter table cw_absence_category drop column description',0,'condition is false','',''),
(15,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_role\', \'description\')','',15,'2018-02-07 00:35:55','\0','init cw_operator_role.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_operator_role set description_de = description, description_en = description','update cw_operator_role set description_de = description, description_en = description',0,'condition is false','',''),
(16,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_role\', \'description\')','',16,'2018-02-07 00:35:55','\0','drop cw_operator_role.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_operator_role drop column description','alter table cw_operator_role drop column description',0,'condition is false','',''),
(17,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_cost_unit_category\', \'description\')','',17,'2018-02-07 00:35:55','\0','init cw_cost_unit_category.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_cost_unit_category set description_de = description, description_en = description','update cw_cost_unit_category set description_de = description, description_en = description',0,'condition is false','',''),
(18,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_cost_unit_category\', \'description\')','',18,'2018-02-07 00:35:55','\0','drop cw_cost_unit_category.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_cost_unit_category drop column description','alter table cw_cost_unit_category drop column description',0,'condition is false','',''),
(19,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_machine_category\', \'description\')','',19,'2018-02-07 00:35:55','\0','init cw_machine_category.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_machine_category set description_de = description, description_en = description','update cw_machine_category set description_de = description, description_en = description',0,'condition is false','',''),
(20,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_machine_category\', \'description\')','',20,'2018-02-07 00:35:55','\0','drop cw_machine_c, 0, true,description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_machine_category drop column description','alter table cw_machine_category drop column description',0,'condition is false','',''),
(21,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_category\', \'description\')','',21,'2018-02-07 00:35:55','\0','init cw_order_category.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_order_category set description_de = description, description_en = description','update cw_order_category set description_de = description, description_en = description',0,'condition is false','',''),
(22,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_category\', \'description\')','',22,'2018-02-07 00:35:55','\0','drop cw_order_category.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_order_category drop column description','alter table cw_order_category drop column description',0,'condition is false','',''),
(23,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item_category\', \'description\')','',23,'2018-02-07 00:35:55','\0','init cw_order_item_category.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_order_item_category set description_de = description, description_en = description','update cw_order_item_category set description_de = description, description_en = description',0,'condition is false','',''),
(24,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item_category\', \'description\')','',24,'2018-02-07 00:35:55','\0','drop cw_order_item_category.description','','2018-02-07 00:35:58','2018-02-07 00:35:58','','alter table cw_order_item_category drop column description','alter table cw_order_item_category drop column description',0,'condition is false','',''),
(25,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_project_category\', \'description\')','',25,'2018-02-07 00:35:55','\0','init cw_project_category.description_de, description_en','','2018-02-07 00:35:58','2018-02-07 00:35:58','','update cw_project_category set description_de = description, description_en = description','update cw_project_category set description_de = description, description_en = description',0,'condition is false','',''),
(26,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_project_category\', \'description\')','',26,'2018-02-07 00:35:55','\0','drop cw_project_category.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_project_category drop column description','alter table cw_project_category drop column description',0,'condition is false','',''),
(27,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workplace_category\', \'description\')','',27,'2018-02-07 00:35:55','\0','init cw_workplace_category.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_workplace_category set description_de = description, description_en = description','update cw_workplace_category set description_de = description, description_en = description',0,'condition is false','',''),
(28,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workplace_category\', \'description\')','',28,'2018-02-07 00:35:55','\0','drop cw_workplace_category.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_workplace_category drop column description','alter table cw_workplace_category drop column description',0,'condition is false','',''),
(29,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workprocess_category\', \'description\')','',29,'2018-02-07 00:35:55','\0','init cw_workprocess_category.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_workprocess_category set description_de = description, description_en = description','update cw_workprocess_category set description_de = description, description_en = description',0,'condition is false','',''),
(30,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workprocess_category\', \'description\')','',30,'2018-02-07 00:35:55','\0','drop cw_workprocess_category.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_workprocess_category drop column description','alter table cw_workprocess_category drop column description',0,'condition is false','',''),
(31,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_cost_unit\', \'description\')','',31,'2018-02-07 00:35:55','\0','init cw_cost_unit.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_cost_unit set description_de = description, description_en = description','update cw_cost_unit set description_de = description, description_en = description',0,'condition is false','',''),
(32,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_cost_unit\', \'description\')','',32,'2018-02-07 00:35:55','\0','drop cw_cost_unit.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_cost_unit drop column description','alter table cw_cost_unit drop column description',0,'condition is false','',''),
(33,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_machine\', \'description\')','',33,'2018-02-07 00:35:55','\0','init cw_machine.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_machine set description_de = description, description_en = description','update cw_machine set description_de = description, description_en = description',0,'condition is false','',''),
(34,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_machine\', \'description\')','',34,'2018-02-07 00:35:55','\0','drop cw_machine.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_machine drop column description','alter table cw_machine drop column description',0,'condition is false','',''),
(35,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'description\')','',35,'2018-02-07 00:35:55','\0','init cw_order.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_order set description_de = description, description_en = description','update cw_order set description_de = description, description_en = description',0,'condition is false','',''),
(36,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'description\')','',36,'2018-02-07 00:35:55','\0','drop cw_order.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_order drop column description','alter table cw_order drop column description',0,'condition is false','',''),
(37,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item\', \'description\')','',37,'2018-02-07 00:35:55','\0','init cw_order_item.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_order_item set description_de = description, description_en = description','update cw_order_item set description_de = description, description_en = description',0,'condition is false','',''),
(38,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item\', \'description\')','',38,'2018-02-07 00:35:55','\0','drop cw_order_item.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_order_item drop column description','alter table cw_order_item drop column description',0,'condition is false','',''),
(39,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_project\', \'description\')','',39,'2018-02-07 00:35:55','\0','init cw_project.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_project set description_de = description, description_en = description','update cw_project set description_de = description, description_en = description',0,'condition is false','',''),
(40,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_project\', \'description\')','',40,'2018-02-07 00:35:55','\0','drop cw_project.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_project drop column description','alter table cw_project drop column description',0,'condition is false','',''),
(41,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workplace\', \'description\')','',41,'2018-02-07 00:35:55','\0','init cw_workplace.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_workplace set description_de = description, description_en = description','update cw_workplace set description_de = description, description_en = description',0,'condition is false','',''),
(42,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workplace\', \'description\')','',42,'2018-02-07 00:35:55','\0','drop cw_workplace.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_workplace drop column description','alter table cw_workplace drop column description',0,'condition is false','',''),
(43,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workprocess\', \'description\')','',43,'2018-02-07 00:35:55','\0','init cw_workprocess.description_de, description_en','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_workprocess set description_de = description, description_en = description','update cw_workprocess set description_de = description, description_en = description',0,'condition is false','',''),
(44,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workprocess\', \'description\')','',44,'2018-02-07 00:35:55','\0','drop cw_workprocess.description','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_workprocess drop column description','alter table cw_workprocess drop column description',0,'condition is false','',''),
(45,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'device_type_id\')','',45,'2018-02-07 00:35:55','\0','modify column device_type_id BIGINT(20) DEFAULT NULL','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_device alter column device_type_id BIGINT NULL','alter table cw_device modify column device_type_id BIGINT(20) DEFAULT NULL',0,'condition is false','',''),
(46,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'device_type_id\')','',46,'2018-02-07 00:35:55','\0','alter table cw_device drop column device_type_id','','2018-02-07 00:35:59','2018-02-07 00:35:59','Manuell ausführen (Problem wegen foreign Key): alter table cw_device drop column device_type_id','','',0,'condition is false','',''),
(47,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_device_type\')','',47,'2018-02-07 00:35:55','\0','drop table cw_device_type','','2018-02-07 00:35:59','2018-02-07 00:35:59','Manuell ausführen (Problem wegen foreign Key): drop table cw_device_type','','',0,'Manuell ausführen (Problem wegen foreign Key): drop table cw_device_type','',''),
(48,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'class\')','',48,'2018-02-07 00:35:55','\0','init cw_device.class','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_device set class=\'at.clockwork.terminal.domain.DeviceTibbo\' where class is null or class = \'\'','update cw_device set class=\'at.clockwork.terminal.domain.DeviceTibbo\' where class is null or class = \'\'',0,'OK','',''),
(49,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category\', \'class\')','',49,'2018-02-07 00:35:55','\0','init cw_person_category.class','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_person_category set class=\'at.clockwork.common.domain.PersonCategory\' where class is null or class = \'\'','update cw_person_category set class=\'at.clockwork.common.domain.PersonCategory\' where class is null or class = \'\'',0,'condition is false','',''),
(50,1,'','',50,'2018-02-07 00:35:55','\0','init cw_user.account_expired = false','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_user set account_expired = 0','update cw_user set account_expired = false',0,'OK','',''),
(51,1,'','',51,'2018-02-07 00:35:55','\0','init cw_user.account_locked = false','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_user set account_locked = 0','update cw_user set account_locked = false',0,'OK','',''),
(52,1,'','',52,'2018-02-07 00:35:55','\0','init cw_user.password_expired = false','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_user set password_expired = 0','update cw_user set password_expired = false',0,'OK','',''),
(53,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_user_role\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_role_people\')','',53,'2018-02-07 00:35:55','\0','change table from cw_role_people to cw_user_role','','2018-02-07 00:35:59','2019-02-25 18:36:21','','insert into cw_user_role (user_id, role_id) select user_id, role_id from cw_role_people','insert into cw_user_role (user_id, role_id) select user_id, role_id from cw_role_people',0,'condition is false','',''),
(54,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'class\')','',54,'2018-02-07 00:35:55','\0','init cw_information_type.class','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_information_type set class=\'at.clockwork.time.domain.BookingInformationType\' where class is null or class = \'\'','update cw_information_type set class=\'at.clockwork.time.domain.BookingInformationType\' where class is null or class = \'\'',0,'OK','',''),
(55,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'state\')','',55,'2018-02-07 00:35:55','\0','init cw_order.state = 0','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_order set state = 0 where state is null','update cw_order set state = 0 where state is null',0,'condition is false','',''),
(56,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item\', \'state\')','',56,'2018-02-07 00:35:55','\0','init cw_order_item.state = 0','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_order_item set state = 0 where state is null','update cw_order_item set state = 0 where state is null',0,'condition is false','',''),
(57,1,'','',57,'2018-02-07 00:35:55','\0','init cw_booking.triggered = true','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_booking set triggered = 0','update cw_booking set triggered = true',0,'OK','',''),
(58,1,'','',58,'2018-02-07 00:35:55','\0','init cw_time_time_type_data.triggered = true','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_time_time_type_data set triggered = 0','update cw_time_time_type_data set triggered = true',0,'OK','',''),
(59,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'time_active\')','',59,'2018-02-07 00:35:55','\0','init cw_person.time_active = true','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_person set time_active = 1','update cw_person set time_active = true',0,'condition is false','',''),
(60,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'work_active\')','',60,'2018-02-07 00:35:55','\0','init cw_person.work_active = false','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_person set work_active = 0','update cw_person set work_active = false',0,'condition is false','',''),
(61,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'access_active\')','',61,'2018-02-07 00:35:55','\0','init cw_person.access_active = false','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_person set access_active = 0','update cw_person set access_active = false',0,'condition is false','',''),
(62,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_booking\', \'extern_id\')','',62,'2018-02-07 00:35:56','\0','init cw_booking.extern_id = 0','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_booking set extern_id = 0 where extern_id is null','update cw_booking set extern_id = 0 where extern_id is null',0,'OK','',''),
(63,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_person_2_person_category\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_person_category_persons\')','',63,'2018-02-07 00:35:56','\0','change table cw_person_category_persons to cw_person_2_person_category','','2018-02-07 00:35:59','2019-02-25 18:36:21','','insert into cw_person_2_person_category (person_id, person_category_id, version) select person_id, person_category_id, 0 from cw_person_category_persons','insert into cw_person_2_person_category (person_id, person_category_id, version) select person_id, person_category_id, 0 from cw_person_category_persons',0,'condition is false','',''),
(64,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'tza\')','',64,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.day_value (tza)','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_time_time_type_data set day_value = tza','update cw_time_time_type_data set day_value = tza',0,'condition is false','',''),
(65,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'tza\')','',65,'2018-02-07 00:35:56','\0','drop cw_time_time_type_data.tza','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_time_time_type_data drop column tza','alter table cw_time_time_type_data drop column tza',0,'condition is false','',''),
(66,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'pza\')','',66,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.period_value (pza)','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_time_time_type_data set period_value = pza','update cw_time_time_type_data set period_value = pza',0,'condition is false','',''),
(67,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'pza\')','',67,'2018-02-07 00:35:56','\0','drop cw_time_time_type_data.pza','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_time_time_type_data drop column pza','alter table cw_time_time_type_data drop column pza',0,'condition is false','',''),
(68,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'saend\')','',68,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.changed_total_value (saend)','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_time_time_type_data set changed_total_value = saend','update cw_time_time_type_data set changed_total_value = saend',0,'condition is false','',''),
(69,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'saend\')','',69,'2018-02-07 00:35:56','\0','drop cw_time_time_type_data.saend','','2018-02-07 00:35:59','2018-02-07 00:35:59','','alter table cw_time_time_type_data drop column saend','alter table cw_time_time_type_data drop column saend',0,'condition is false','',''),
(70,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'day_value\')','',70,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.day_value (0)','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_time_time_type_data set day_value = 0 where day_value is null','update cw_time_time_type_data set day_value = 0 where day_value is null',0,'OK','',''),
(71,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'period_value\')','',71,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.period_value (0)','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_time_time_type_data set period_value = 0 where period_value is null','update cw_time_time_type_data set period_value = 0 where period_value is null',0,'OK','',''),
(72,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'changed_period_value\')','',72,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.changed_period_value (0)','','2018-02-07 00:35:59','2018-02-07 00:35:59','','update cw_time_time_type_data set changed_period_value = 0 where changed_period_value is null','update cw_time_time_type_data set changed_period_value = 0 where changed_period_value is null',0,'OK','',''),
(73,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'changed_total_value\')','',73,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.changed_total_value (0)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','update cw_time_time_type_data set changed_total_value = 0 where changed_total_value is null','update cw_time_time_type_data set changed_total_value = 0 where changed_total_value is null',0,'OK','',''),
(74,3,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'sal\')','',74,'2018-02-07 00:35:56','\0','init cw_time_time_type_data_total.total_value','','2018-02-07 00:36:00','2019-02-25 18:36:21','','','',0,'condition is false','','\nimport at.clockwork.security.domain.*\nimport at.clockwork.time.domain.*\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		boolean error = true\n\n		Date dateFrom = new Date(2008-1900, 0, 1)\n		Date dateTo = new Date()\n\n		for (date in dateFrom..dateTo) {\n			if (date.getMonth() != (date+1).getMonth()) {\n				def resultMap = at.clockwork.system.service.DataSourceService.execute(\n					connection,\n					dataSourceFields,\n					[\n						mySQLStatement:\"insert into cw_time_time_type_data_total (version, person_id, date, time_time_type_id, total_value) select 0, person_id, date, time_time_type_id, sal from cw_time_time_type_data where date = \'\" + date.format(\"yyyy-MM-dd\") + \"\'\",\n						msSQLStatement:\"insert into cw_time_time_type_data_total (version, person_id, date, time_time_type_id, total_value) select 0, person_id, date, time_time_type_id, sal from cw_time_time_type_data where convert(varchar(10), date, 120) = \'\" + date.format(\"yyyy-MM-dd\") + \"\'\"\n					]\n				)\n			}\n		}\n\n		error\n	}\n}\n'),
(75,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'sal\')','',75,'2018-02-07 00:35:56','\0','drop cw_time_time_type_data.sal','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_time_time_type_data drop column sal','alter table cw_time_time_type_data drop column sal',0,'condition is false','',''),
(76,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'limitv\')','',76,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.limitv (0)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','update cw_time_time_type_data set limitv = 0 where limitv is null','update cw_time_time_type_data set limitv = 0 where limitv is null',0,'condition is false','',''),
(77,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'limitv\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'limit_value\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_time_time_type_data_total\')','',77,'2018-02-07 00:35:56','\0','init cw_time_time_type_data_limit.limit_value','',NULL,'2019-02-25 18:36:21','','','',0,NULL,'','\nimport at.clockwork.time.timeType.domain.TimeTimeTypeDataTotal\n\nimport groovy.sql.Sql\nimport java.sql.Connection\nimport java.sql.DriverManager\nimport javax.sql.DataSource\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		def last_person_id\n		def last_time_time_type_id\n		def last_value\n\n//		int minId = 0\n//		int maxId = 0\n//		def row = connection.firstRow(\"select min(id) as min, max(id) as max from cw_time_time_type_data\")\n//		minId = row.min\n//		maxId = row.max\n//		if (!minId)\n//			minId = 0\n//		if (!maxId)\n//			maxId = 0\n\n//		int count = maxId\n//		int offset = minId\n\n		int offset = 0\n		int count = at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \"cw_time_time_type_data\")\n		int maxRows = 100000\n\nprintln \"count=\" + count\n\n		long id\n		long person_id\n		long time_time_type_id\n		Date date\n		double limitv\n\ncount = 0\n\n		for (offset=0; offset<count; offset+=maxRows) {\n\n			String selectStatement =\n				\"select id, person_id, time_time_type_id, date, limitv \" +\n				\"from cw_time_time_type_data \" +\n				\"order by person_id, time_time_type_id, date\"\n\nprintln \"-->offset=\" + offset + \" von=\" + count\n			connection.eachRow(selectStatement, offset, maxRows) {\n\n				id = it.id\n				person_id = it.person_id\n				time_time_type_id = it.time_time_type_id\n				date = it.date\n				limitv = it.limitv\n\n				if (!last_person_id || !last_time_time_type_id || last_value ||\n					last_person_id != person_id || last_time_time_type_id != time_time_type_id || last_value != limitv) {\n\n					def resultMap = at.clockwork.system.service.DataSourceService.execute(\n						connection,\n						dataSourceFields,\n						[\n							mySQLStatement:\"insert into cw_time_time_type_data_limit (version, person_id, date, time_time_type_id, limit_value) select 0, person_id, date, time_time_type_id, limitv from cw_time_time_type_data where id = \" + id,\n							msSQLStatement:\"insert into cw_time_time_type_data_limit (version, person_id, date, time_time_type_id, limit_value) select 0, person_id, date, time_time_type_id, limitv from cw_time_time_type_data where id = \" + id\n						]\n					)\n\n					last_person_id = person_id\n					last_time_time_type_id = time_time_type_id\n					last_value = limitv\n\n				}\n\n			}\n\n		}\n\n\n		true\n	}\n}'),
(78,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'limitv\')','',78,'2018-02-07 00:35:56','\0','drop cw_time_time_type_data.limitv','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_time_time_type_data drop column limitv','alter table cw_time_time_type_data drop column limitv',0,'condition is false','',''),
(79,1,'','',79,'2018-02-07 00:35:56','\0','delete cw_time_time_type_data where ... = 0','','2018-02-07 00:36:00','2018-02-07 00:36:00','','delete from cw_time_time_type_data where day_value = 0 and period_value = 0 and changed_period_value = 0 and changed_total_value = 0','delete from cw_time_time_type_data where day_value = 0 and period_value = 0 and changed_period_value = 0 and changed_total_value = 0',0,'OK','',''),
(80,1,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_absence_planning_detail\') == 0 || (at.clockwork.system.service.DataSourceService.getFieldTypeInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_from\') ?: \'\').toUpperCase().contains(\'DATE\') || (at.clockwork.system.service.DataSourceService.getFieldTypeInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_from\') ?: \'\').toUpperCase().contains(\'TIME\') || (at.clockwork.system.service.DataSourceService.getFieldTypeInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_from\') ?: \'NULL\').toUpperCase().contains(\'NULL\')','',80,'2018-02-07 00:35:56','\0','change cw_absence_planning_detail.time_from to integer (part 1)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_absence_planning_detail drop column time_from','alter table cw_absence_planning_detail drop column time_from',0,'OK','',''),
(81,1,'!at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_from\')','',81,'2018-02-07 00:35:56','\0','change cw_absence_planning_detail.time_from to integer (part 2)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_absence_planning_detail add time_from INTEGER','alter table cw_absence_planning_detail add column time_from INTEGER',0,'OK','',''),
(82,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_from\')','',82,'2018-02-07 00:35:56','\0','change cw_absence_planning_detail.time_from to integer (part 3)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','update cw_absence_planning_detail set time_from = 0 where time_from is null','update cw_absence_planning_detail set time_from = 0 where time_from is null',0,'OK','',''),
(83,1,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_absence_planning_detail\') == 0 || (at.clockwork.system.service.DataSourceService.getFieldTypeInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_to\') ?: \'\').toUpperCase().contains(\'DATE\') || (at.clockwork.system.service.DataSourceService.getFieldTypeInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_to\') ?: \'\').toUpperCase().contains(\'TIME\') || (at.clockwork.system.service.DataSourceService.getFieldTypeInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_to\') ?: \'NULL\').toUpperCase().contains(\'NULL\')','',83,'2018-02-07 00:35:56','\0','change cw_absence_planning_detail.time_to to integer (part 1)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_absence_planning_detail drop column time_to','alter table cw_absence_planning_detail drop column time_to',0,'OK','',''),
(84,1,'!at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_to\')','',84,'2018-02-07 00:35:56','\0','change cw_absence_planning_detail.time_to to integer (part 2)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_absence_planning_detail add time_to INTEGER','alter table cw_absence_planning_detail add column time_to INTEGER',0,'OK','',''),
(85,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_to\')','',85,'2018-02-07 00:35:56','\0','change cw_absence_planning_detail.time_to to integer (part 3)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','update cw_absence_planning_detail set time_to = 0 where time_to is null','update cw_absence_planning_detail set time_to = 0 where time_to is null',0,'OK','',''),
(86,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category\', \'class\')','',86,'2018-02-07 00:35:56','\0','init cw_person_category.class','','2018-02-07 00:36:00','2018-02-07 00:36:00','','update cw_person_category set class = \'at.clockwork.common.domain.PersonCategory\' where class is null or class = \'\'','update cw_person_category set class = \'at.clockwork.common.domain.PersonCategory\' where class is null or class = \'\'',0,'condition is false','',''),
(87,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_type_operation_detail\', \'class\')','',87,'2018-02-07 00:35:56','\0','init cw_operator_type_detail.class','','2018-02-07 00:36:00','2018-02-07 00:36:00','','update cw_operator_type_detail set class = \'at.clockwork.security.domain.OperatorTypeOperationDetail\' where class is null or class = \'\'','update cw_operator_type_detail set class = \'at.clockwork.security.domain.OperatorTypeOperationDetail\' where class is null or class = \'\'',0,'condition is false','',''),
(88,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operation_role\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_type_detail\', \'operation_role_id\')','',88,'2018-02-07 00:35:56','\0','change table cw_operation_role to cw_operator_role','','2018-02-07 00:36:59','2018-02-07 00:36:59','','','',1,'condition is false','','\nimport at.clockwork.security.domain.*\n\nimport groovy.sql.Sql\nimport java.sql.Connection\nimport java.sql.DriverManager\nimport javax.sql.DataSource\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		connection.eachRow(\'select a.id, a.operation_role_id, b.cwid from cw_operator_type_detail a, cw_operation_role b where a.operator_role_id is null and a.operation_role_id is not null and a.operation_role_id = b.id\') {\n\n			OperatorRole operatorRole = OperatorRole.findWhere(cwID:it.cwid)\n			if (operatorRole) {\n				def resultMap = at.clockwork.system.service.DataSourceService.execute(\n					connection,\n					dataSourceFields,\n					[\n						mySQLStatement:\"update cw_operator_type_detail set operator_role_id = \" + operatorRole.id + \" where id = \" + it.id,\n						msSQLStatement:\"update cw_operator_type_detail set operator_role_id = \" + operatorRole.id + \" where id = \" + it.id\n					]\n				)\n			}\n\n		}\n\n		true\n	}\n}\n'),
(89,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_type_detail\', \'operation_role_id\')','',89,'2018-02-07 00:35:56','\0','alter cw_operator_type_detail drop column operation_role_id (part 1 - foreign key!)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_operator_type_detail alter column operation_role_id BIGINT NULL','alter table cw_operator_type_detail modify column operation_role_id BIGINT(20) DEFAULT NULL',0,'OK','',''),
(90,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_type_detail\', \'operation_role_id\')','',90,'2018-02-07 00:35:56','\0','alter cw_operator_type_detail drop column operation_role_id (part 2)','','2018-02-07 00:36:00','2018-02-07 00:36:00','Manuell ausführen (Problem wegen foreign key): alter cw_operator_type_detail drop column operation_role_id','','',0,'Manuell ausführen (Problem wegen foreign key): alter cw_operator_type_detail drop column operation_role_id','',''),
(91,1,'','',92,'2018-02-07 00:35:56','\0','clean systemConfiguration','','2018-02-07 00:36:00','2018-02-07 00:36:00','','','',0,'OK','','\nimport at.clockwork.system.service.SystemConfigurationService\nimport at.clockwork.system.domain.*\n\nimport grails.util.Holders\nclass UpdateScriptService {\n\n	def systemConfigurationService = Holders.grailsApplication.mainContext.getBean \'systemConfigurationService\'\n	def run(def connection, def dataSourceFields) {\n\n		systemConfigurationService.deleteByCwID(1)\n		systemConfigurationService.deleteByCwID(11)\n		systemConfigurationService.deleteByCwID(12)\n		systemConfigurationService.deleteByCwID(13)\n		systemConfigurationService.deleteByCwID(14)\n		systemConfigurationService.deleteByCwID(21)\n		systemConfigurationService.deleteByCwID(22)\n		systemConfigurationService.deleteByCwID(23)\n		systemConfigurationService.deleteByCwID(34)\n		systemConfigurationService.deleteByCwID(35)\n		systemConfigurationService.deleteByCwID(51)\n		systemConfigurationService.deleteByCwID(52)\n\n		true\n	}\n}\n'),
(92,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'display_column_report\')','',93,'2018-02-07 00:35:56','\0','TimeTimeTypeDefinition for PersonTime-Report','','2018-02-07 00:36:59','2025-03-19 11:55:27','','','',1,'condition is false','','\nimport at.clockwork.time.domain.*\nimport at.clockwork.time.timeType.domain.*\nimport at.clockwork.security.domain.*\nimport at.clockwork.report.domain.*\nimport at.clockwork.time.enumeration.*\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_time_time_type set reduce_total = true where reduce_total is null\",\n				msSQLStatement:\"update cw_time_time_type set reduce_total = 0 where reduce_total is null\"\n			]\n		)\n\n		TimeTimeTypeDefinition timeTimeTypeDefinition = new TimeTimeTypeDefinition(name:\"PersonTime\", description:\"PersonTime\")\n		timeTimeTypeDefinition.save()\n		if (timeTimeTypeDefinition) {\n\n			connection.eachRow(\'select id, display_column_report from cw_time_time_type where display_column_report is not null and display_column_report > 0 order by display_column_report\') {\n\n				long id = it.id\n				int displayColumnReport = it.display_column_report\n				TimeTimeType timeTimeType = TimeTimeType.get(id)\n\n				if (timeTimeType && !timeTimeType.deleted) {\n\n					timeTimeTypeDefinition.save()\n                    new TimeTimeTypeDefinitionDetail(\n                        timeTimeTypeDefinition:timeTimeTypeDefinition,\n                        position:displayColumnReport,\n//						description:\"\",\n                        timeTimeType:timeTimeType\n//						TimeFormat timeFormat\n//						timeCalculation:TimeCalculation.DAY,\n//						timeDurationInRelationTo:TimeDurationInRelationTo.DAY,\n//						timeDuration:TimeDuration.TODAY\n                    ).save()\n\n				}\n			}\n\n			ReportRole.findAll(\"from ReportRole where cwID in (:reportRoles)\", [reportRoles:[ReportRole.PersonTime001, ReportRole.PersonTime001Landscape]]).each { reportRole ->\n				reportRole.ReportRole = timeTimeTypeDefinition\n//				reportRole.addToTimeTimeTypeDefinitions(timeTimeTypeDefinition)\n				reportRole.save()\n			}\n\n		}\n\n		true\n	}\n}\n'),
(93,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'display_column_report\')','',94,'2018-02-07 00:35:56','\0','drop cw_time_time_type.displayColumnReport','','2018-02-07 00:36:59','2018-02-07 00:36:59','','alter table cw_time_time_type drop column display_column_report','alter table cw_time_time_type drop column display_column_report',1,'condition is false','',''),
(94,3,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'display_column\')','',95,'2018-02-07 00:35:56','\0','TimeTimeTypeDefinition for booking','','2018-02-07 00:36:59','2025-03-19 11:55:27','','','',1,'condition is false','','\nimport at.clockwork.time.domain.*\nimport at.clockwork.time.timeType.domain.*\nimport at.clockwork.report.domain.*\nimport at.clockwork.time.enumeration.*\nimport at.clockwork.system.service.SystemConfigurationService\n\nimport grails.util.Holders\n\n\n\n\nclass UpdateScriptService {\n\n	def systemConfigurationService = Holders.grailsApplication.mainContext.getBean \'systemConfigurationService\'\n\n	def run(def connection, def dataSourceFields) {\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_time_time_type set reduce_total = true where reduce_total is null\",\n				msSQLStatement:\"update cw_time_time_type set reduce_total = 0 where reduce_total is null\"\n			]\n		)\n\n		TimeTimeTypeDefinition timeTimeTypeDefinition = new TimeTimeTypeDefinition(name:\"booking\", description:\"booking\")\n		timeTimeTypeDefinition.save()\n		if (timeTimeTypeDefinition) {\n\n			connection.eachRow(\'select id, display_column from cw_time_time_type where display_column is not null and display_column > 0 order by display_column\') {\n\n				long id = it.id\n				int displayColumn = it.display_column\n				TimeTimeType timeTimeType = TimeTimeType.get(id)\n\n				if (timeTimeType && !timeTimeType.deleted) {\n\n					timeTimeTypeDefinition.save()\n                    new TimeTimeTypeDefinitionDetail(\n                        timeTimeTypeDefinition:timeTimeTypeDefinition,\n                        position:displayColumn,\n                        timeTimeType:timeTimeType\n                    ).save()\n\n				}\n			}\n\n			systemConfigurationService.updateByCwID((int) 62, (int) timeTimeTypeDefinition.id, (String) null, (Date) null, (boolean) true, (double) 0)\n\n		}\n\n		true\n	}\n}\n'),
(95,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'display_column\')','',96,'2018-02-07 00:35:56','\0','drop cw_time_time_type.displayColumn','','2018-02-07 00:36:59','2018-02-07 00:37:00','','alter table cw_time_time_type drop column display_column','alter table cw_time_time_type drop column display_column',1,'condition is false','',''),
(96,3,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'display_column_booking\')','',97,'2018-02-07 00:35:56','\0','TimeTimeTypeDefinition for booking','','2018-02-07 00:37:00','2025-03-19 11:55:27','','','',1,'condition is false','','\nimport at.clockwork.time.domain.*\nimport at.clockwork.time.timeType.domain.*\nimport at.clockwork.report.domain.*\nimport at.clockwork.time.enumeration.*\nimport at.clockwork.system.service.SystemConfigurationService\n\nimport grails.util.Holders\n\n\n\n\nclass UpdateScriptService {\n\n	def systemConfigurationService = Holders.grailsApplication.mainContext.getBean \'systemConfigurationService\'\n\n\n	def run(def connection, def dataSourceFields) {\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_time_time_type set reduce_total = true where reduce_total is null\",\n				msSQLStatement:\"update cw_time_time_type set reduce_total = 0 where reduce_total is null\"\n			]\n		)\n\n		TimeTimeTypeDefinition timeTimeTypeDefinition = new TimeTimeTypeDefinition(name:\"booking 2\", description:\"booking 2\")\n		timeTimeTypeDefinition.save()\n		if (timeTimeTypeDefinition) {\n\n			connection.eachRow(\'select id, display_column_booking from cw_time_time_type where display_column_booking is not null and display_column_booking > 0 order by display_column_booking\') {\n\n				long id = it.id\n				int displayColumnBooking = it.display_column_booking\n				TimeTimeType timeTimeType = TimeTimeType.get(id)\n\n				if (timeTimeType && !timeTimeType.deleted) {\n\n					timeTimeTypeDefinition.save()\n                    new TimeTimeTypeDefinitionDetail(\n                        timeTimeTypeDefinition:timeTimeTypeDefinition,\n                        position:displayColumnBooking,\n                        timeTimeType:timeTimeType\n                    ).save()\n\n				}\n			}\n\n			systemConfigurationService.updateByCwID((int) 62, (int) timeTimeTypeDefinition.id, (String) null, (Date) null, (boolean) true, (double) 0)\n\n		}\n\n		true\n	}\n}\n'),
(97,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'display_column_booking\')','',98,'2018-02-07 00:35:56','\0','drop cw_time_time_type.displayColumnBooking','','2018-02-07 00:37:00','2018-02-07 00:37:00','','alter table cw_time_time_type drop column display_column_booking','alter table cw_time_time_type drop column display_column_booking',1,'condition is false','',''),
(98,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'reduce_total\')','',99,'2018-02-07 00:35:56','\0','init timeTimeType.reduceTotal','','2018-02-07 00:36:00','2018-02-07 00:36:00','','','',0,'OK','','\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_time_time_type set reduce_total = true where reduce_total is null\",\n				msSQLStatement:\"update cw_time_time_type set reduce_total = 0 where reduce_total is null\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_time_time_type set reduce_total = true where number = \'40\'\",\n				msSQLStatement:\"update cw_time_time_type set reduce_total = 1 where number = \'40\'\"\n			]\n		)\n\n		long rowId = 0\n		def row = connection.firstRow(\"select id from cw_time_time_type where number = \'40\'\")\n		if (row)\n			rowId = row[\"id\"]\n\n		if (rowId > 0) {\n			resultMap = at.clockwork.system.service.DataSourceService.execute(\n				connection,\n				dataSourceFields,\n				[\n					mySQLStatement:\"update cw_time_time_type_data set day_value = day_value*(-1),  period_value = period_value*(-1),  changed_period_value = changed_period_value*(-1),  changed_total_value = changed_total_value*(-1) where time_time_type_id = \" + rowId,\n					msSQLStatement:\"update cw_time_time_type_data set day_value = day_value*(-1),  period_value = period_value*(-1),  changed_period_value = changed_period_value*(-1),  changed_total_value = changed_total_value*(-1) where time_time_type_id = \" + rowId\n				]\n			)\n		}\n\n		true\n	}\n}\n'),
(99,1,'!at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'email_subject_text\')','',100,'2018-02-07 00:35:56','\0','change cw_information_type from eMailsubjectText to emailSubjectText (part 1)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_information_type add email_subject_text VARCHAR(255) NULL','alter table cw_information_type add column email_subject_text VARCHAR(255) DEFAULT NULL',0,'condition is false','',''),
(100,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'e_mail_subject_text\')','',101,'2018-02-07 00:35:56','\0','change cw_information_type from eMailsubjectText to emailSubjectText (part 2)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','update cw_information_type set email_subject_text = e_mail_subject_text','update cw_information_type set email_subject_text = e_mail_subject_text',0,'condition is false','',''),
(101,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'e_mail_subject_text\')','',102,'2018-02-07 00:35:56','\0','change cw_information_type from eMailsubjectText to emailSubjectText (part 3)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_information_type alter column email_subject_text VARCHAR(255)','alter table cw_information_type modify column email_subject_text VARCHAR(255)',0,'condition is false','',''),
(102,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'e_mail_subject_text\')','',103,'2018-02-07 00:35:56','\0','change cw_information_type from eMailsubjectText to emailSubjectText (part 4)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_information_type drop column e_mail_subject_text','alter table cw_information_type drop column e_mail_subject_text',0,'condition is false','',''),
(103,1,'!at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'email_object_text\')','',104,'2018-02-07 00:35:56','\0','change cw_information_type from eMailobjectText to emailobjectText (part 1)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_information_type add email_object_text VARCHAR(255) NULL','alter table cw_information_type add column email_object_text VARCHAR(255) DEFAULT NULL',0,'condition is false','',''),
(104,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'e_mail_object_text\')','',105,'2018-02-07 00:35:56','\0','change cw_information_type from eMailobjectText to emailobjectText (part 2)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','update cw_information_type set email_object_text = e_mail_object_text','update cw_information_type set email_object_text = e_mail_object_text',0,'condition is false','',''),
(105,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'e_mail_object_text\')','',106,'2018-02-07 00:35:56','\0','change cw_information_type from eMailobjectText to emailobjectText (part 3)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_information_type alter column email_object_text VARCHAR(255)','alter table cw_information_type modify column email_object_text VARCHAR(255)',0,'condition is false','',''),
(106,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'e_mail_object_text\')','',107,'2018-02-07 00:35:56','\0','change cw_information_type from eMailobjectText to emailobjectText (part 4)','','2018-02-07 00:36:00','2018-02-07 00:36:00','','alter table cw_information_type drop column e_mail_object_text','alter table cw_information_type drop column e_mail_object_text',0,'condition is false','',''),
(107,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information\', \'e_mail_prepared\')','',108,'2018-02-07 00:35:56','\0','change cw_information from eMailPrepared to emailPrepared (part 1)','','2018-02-07 00:36:00','2018-02-07 00:36:01','','update cw_information set email_prepared = e_mail_prepared','update cw_information set email_prepared = e_mail_prepared',0,'condition is false','',''),
(108,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information\', \'e_mail_prepared\')','',109,'2018-02-07 00:35:56','\0','change cw_information from eMailsubjectText to emailSubjectText (part 2)','','2018-02-07 00:36:01','2018-02-07 00:36:01','','alter table cw_information drop column e_mail_prepared','alter table cw_information drop column e_mail_prepared',0,'condition is false','',''),
(109,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_system_configuration\', \'b_value\')','',110,'2018-02-07 00:35:56','\0','init cw_system_configuration.b_value = false','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_system_configuration set b_value = 0 where b_value is null','update cw_system_configuration set b_value = false where b_value is null',0,'condition is false','',''),
(110,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_system_configuration\', \'b_value\')','',111,'2018-02-07 00:35:56','\0','change cw_system_configuration from bValue to booleanValue (part 1)','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_system_configuration set boolean_value = b_value','update cw_system_configuration set boolean_value = b_value',0,'condition is false','',''),
(111,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_system_configuration\', \'b_value\')','',112,'2018-02-07 00:35:56','\0','change cw_system_configuration from bValue to booleanValue (part 2)','','2018-02-07 00:36:01','2018-02-07 00:36:01','','alter table cw_system_configuration drop column b_value','alter table cw_system_configuration drop column b_value',0,'condition is false','',''),
(112,1,'','',113,'2018-02-07 00:35:56','\0','Trigger for SynchronizeWithClockworkFoxpro','','2018-02-07 00:36:01','2018-02-07 00:36:01','','','',0,'OK','','\nimport at.clockwork.system.service.SystemConfigurationService\nimport at.clockwork.system.domain.*\nimport at.clockwork.singleton.*\nimport at.clockwork.common.enumeration.*\nimport at.clockwork.system.enumeration.*\nimport at.clockwork.transfer.gwtTransfer.client.enumeration.TriggerTypeEnum\nimport at.clockwork.transfer.gwtTransfer.client.enumeration.JobStartTypeEnum\n\nimport grails.util.Holders\n\n\n\nclass UpdateScriptService {\n\n	def systemConfigurationService = Holders.grailsApplication.mainContext.getBean \'systemConfigurationService\'\n	def triggerWriteService = Holders.grailsApplication.mainContext.getBean \'triggerWriteService\'\n\n	def run(def connection, def dataSourceFields) {\n\n		def systemConfigurations = SystemConfigurations.getInstance()\n\n		if (systemConfigurations.getItem(53, \"booleanValue\") == true) {\n			triggerWriteService.save(\n				new Trigger(\n					name:\"SYNCHRONIZE_WITH_CLOCKWORK_FOXPRO\",\n					description:\"SYNCHRONIZE_WITH_CLOCKWORK_FOXPRO\",\n					triggerTypeEnum:TriggerTypeEnum.SYNCHRONIZE_WITH_CLOCKWORK_FOXPRO,\n					jobStartTypeEnum:JobStartTypeEnum.AUTOMATIC,\n					cronDefinition:\"0/10 * * * * ?\"\n				)\n			)\n		}\n		systemConfigurationService.deleteByCwID(53)\n\n		true\n	}\n}\n'),
(113,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'log_communication_information_type_ok\')','',114,'2018-02-07 00:35:56','\0','init cw_device.log_communication_information_type_ok','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_device set log_communication_information_type_ok = 1','update cw_device set log_communication_information_type_ok = true',0,'OK','',''),
(114,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'log_communication_information_type_info\')','',115,'2018-02-07 00:35:56','\0','init cw_device.log_communication_information_type_info','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_device set log_communication_information_type_info = 1','update cw_device set log_communication_information_type_info = true',0,'OK','',''),
(115,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'log_communication_information_type_warning\')','',116,'2018-02-07 00:35:56','\0','init cw_device.log_communication_information_type_warning','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_device set log_communication_information_type_warning = 1','update cw_device set log_communication_information_type_warning = true',0,'OK','',''),
(116,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'log_communication_information_type_repeat\')','',117,'2018-02-07 00:35:56','\0','init cw_device.log_communication_information_type_repeat','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_device set log_communication_information_type_repeat = 1','update cw_device set log_communication_information_type_repeat = true',0,'OK','',''),
(117,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'log_communication_information_type_error\')','',118,'2018-02-07 00:35:56','\0','init cw_device.log_communication_information_type_error','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_device set log_communication_information_type_error = 1','update cw_device set log_communication_information_type_error = true',0,'OK','',''),
(118,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'log_communication_information_type_fatal_error\')','',119,'2018-02-07 00:35:56','\0','init cw_device.log_communication_information_type_fatal_error','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_device set log_communication_information_type_fatal_error = 1','update cw_device set log_communication_information_type_fatal_error = true',0,'OK','',''),
(119,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'log_communication_information_type_ok\')','',120,'2018-02-07 00:35:56','\0','init cw_terminal.log_communication_information_type_ok','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set log_communication_information_type_ok = 1','update cw_terminal set log_communication_information_type_ok = true',0,'OK','',''),
(120,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'log_communication_information_type_info\')','',121,'2018-02-07 00:35:56','\0','init cw_terminal.log_communication_information_type_info','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set log_communication_information_type_info = 1','update cw_terminal set log_communication_information_type_info = true',0,'OK','',''),
(121,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'log_communication_information_type_warning\')','',122,'2018-02-07 00:35:56','\0','init cw_terminal.log_communication_information_type_warning','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set log_communication_information_type_warning = 1','update cw_terminal set log_communication_information_type_warning = true',0,'OK','',''),
(122,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'log_communication_information_type_repeat\')','',123,'2018-02-07 00:35:56','\0','init cw_terminal.log_communication_information_type_repeat','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set log_communication_information_type_repeat = 1','update cw_terminal set log_communication_information_type_repeat = true',0,'OK','',''),
(123,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'log_communication_information_type_error\')','',124,'2018-02-07 00:35:56','\0','init cw_terminal.log_communication_information_type_error','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set log_communication_information_type_error = 1','update cw_terminal set log_communication_information_type_error = true',0,'OK','',''),
(124,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'log_communication_information_type_fatal_error\')','',125,'2018-02-07 00:35:56','\0','init cw_terminal.log_communication_information_type_fatal_error','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set log_communication_information_type_fatal_error = 1','update cw_terminal set log_communication_information_type_fatal_error = true',0,'OK','',''),
(125,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'credit_value\')','',126,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.credit_value (0)','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_time_time_type_data set credit_value = 0 where credit_value is null','update cw_time_time_type_data set credit_value = 0 where credit_value is null',0,'OK','',''),
(126,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'transfer_total_after_close\')','',127,'2018-02-07 00:35:56','\0','init cw_time_time_type.transfer_total_after_close (0)','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_time_time_type set transfer_total_after_close = 0 where transfer_total_after_close is null','update cw_time_time_type set transfer_total_after_close = false where transfer_total_after_close is null',0,'OK','',''),
(127,1,'','',128,'2018-02-07 00:35:56','\0','init cw_terminal.read_events = true','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set read_events = 1','update cw_terminal set read_events = true',0,'OK','',''),
(128,1,'','',129,'2018-02-07 00:35:56','\0','init cw_terminal.request_state = true','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set request_state = 1','update cw_terminal set request_state = true',0,'OK','',''),
(129,1,'','',130,'2018-02-07 00:35:56','\0','init cw_terminal.update_data = true','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal set update_data = 1','update cw_terminal set update_data = true',0,'OK','',''),
(130,1,'','',131,'2018-02-07 00:35:56','\0','init TimeTimeTypeDataTotal','','2018-02-07 00:36:01','2018-02-07 00:36:01','','','',0,'OK','','\n//import at.clockwork.common.domain.Person\n//import at.clockwork.time.service.TimeTimeTypeTransactionalService\n//import at.clockwork.common.domain.PersonReadService\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		true\n	}\n}\n'),
(131,1,'','',132,'2018-02-07 00:35:56','\0','init cw_gps_booking.valid_gps_position = true','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_gps_booking set valid_gps_position = 1','update cw_gps_booking set valid_gps_position = true',0,'OK','',''),
(132,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_domain_class\', \'customer_spooling\')','',133,'2018-02-07 00:35:56','\0','init cw_domain_class.customer_spooling = false','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_domain_class set customer_spooling = 0 where customer_spooling is null','update cw_domain_class set customer_spooling = false where customer_spooling is null',0,'OK','',''),
(133,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_person_2_qualification\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_person_cw_qualification\')','',134,'2018-02-07 00:35:56','\0','change table cw_person_cw_qualification to cw_person_2_qualification','','2018-02-07 00:36:01','2019-02-25 18:36:21','','insert into cw_person_2_qualification (person_id, qualification_id, version) select person_qualifications_id, qualification_id, 0 from cw_person_cw_qualification','insert into cw_person_2_qualification (person_id, qualification_id, version) select person_qualifications_id, qualification_id, 0 from cw_person_cw_qualification',0,'condition is false','',''),
(134,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_domain_class\', \'customer_spooling_code\')','',135,'2018-02-07 00:35:56','\0','init cw_domain_class.customer_spooling_code = \'\'','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_domain_class set customer_spooling_code = \'\' where customer_spooling_code is null','update cw_domain_class set customer_spooling_code = \'\' where customer_spooling_code is null',0,'OK','',''),
(135,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_gps_booking\', \'date_created\')','',136,'2018-02-07 00:35:56','\0','init cw_gps_booking.date_created = curdate()','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_gps_booking set date_created = getdate() where date_created is null','update cw_gps_booking set date_created = curdate() where date_created is null',0,'OK','',''),
(136,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_gps_booking\', \'last_updated\')','',137,'2018-02-07 00:35:56','\0','init cw_gps_booking.last_updated = curdate()','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_gps_booking set last_updated = getdate() where last_updated is null','update cw_gps_booking set last_updated = curdate() where last_updated is null',0,'OK','',''),
(137,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_gps_booking\', \'update_counter\')','',138,'2018-02-07 00:35:56','\0','init cw_gps_booking.update_counter = 0','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_gps_booking set update_counter = 0 where update_counter is null','update cw_gps_booking set update_counter = 0 where update_counter is null',0,'OK','',''),
(138,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_address\', \'deleted\')','',139,'2018-02-07 00:35:56','\0','init cw_address.deleted = false','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_address set deleted = 0','update cw_address set deleted = false',0,'OK','',''),
(139,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_address\', \'date_created\')','',140,'2018-02-07 00:35:56','\0','init cw_address.date_created = curdate()','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_address set date_created = getdate() where date_created is null','update cw_address set date_created = curdate() where date_created is null',0,'OK','',''),
(140,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_address\', \'last_updated\')','',141,'2018-02-07 00:35:56','\0','init cw_address.last_updated = curdate()','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_address set last_updated = getdate() where last_updated is null','update cw_address set last_updated = curdate() where last_updated is null',0,'OK','',''),
(141,106,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_system_configuration\', \'deleted\')','',143,'2018-02-07 00:35:56','\0','init cw_system_configuration.deleted = false','','2018-02-07 00:36:01','2025-03-24 00:42:01','','update cw_system_configuration set deleted = 0','update cw_system_configuration set deleted = false',0,'OK','',''),
(142,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_system_configuration\', \'boolean_value\')','',144,'2018-02-07 00:35:56','\0','init cw_system_configuration.boolean_value = false','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_system_configuration set boolean_value = 0 where boolean_value is null','update cw_system_configuration set boolean_value = false where boolean_value is null',0,'OK','',''),
(143,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_2_synchronisation_area\', \'synchronise_me\')','',145,'2018-02-07 00:35:56','\0','init cw_terminal_2_synchronisation_area.synchronise_me = true','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_terminal_2_synchronisation_area set synchronise_me = 1 where synchronise_me is null','update cw_terminal_2_synchronisation_area set synchronise_me = true where synchronise_me is null',0,'OK','',''),
(144,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_region\', \'deleted\')','',146,'2018-02-07 00:35:56','\0','init cw_region.deleted = false','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_region set deleted = 0 where deleted is null','update cw_region set deleted = false where deleted is null',0,'OK','',''),
(145,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_region\', \'date_created\')','',147,'2018-02-07 00:35:56','\0','init cw_region.date_created = curdate()','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_region set date_created = getdate() where date_created is null','update cw_region set date_created = curdate() where date_created is null',0,'OK','',''),
(146,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_region\', \'last_updated\')','',148,'2018-02-07 00:35:56','\0','init cw_region.last_updated = curdate()','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_region set last_updated = getdate() where last_updated is null','update cw_region set last_updated = curdate() where last_updated is null',0,'OK','',''),
(147,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_religion\', \'deleted\')','',149,'2018-02-07 00:35:56','\0','init cw_religion.deleted = false','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_religion set deleted = 0 where deleted is null','update cw_religion set deleted = false where deleted is null',0,'OK','',''),
(148,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_religion\', \'date_created\')','',150,'2018-02-07 00:35:56','\0','init cw_religion.date_created = curdate()','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_religion set date_created = getdate() where date_created is null','update cw_religion set date_created = curdate() where date_created is null',0,'OK','',''),
(149,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_religion\', \'last_updated\')','',151,'2018-02-07 00:35:56','\0','init cw_religion.last_updated = curdate()','','2018-02-07 00:36:01','2018-02-07 00:36:01','','update cw_religion set last_updated = getdate() where last_updated is null','update cw_religion set last_updated = curdate() where last_updated is null',0,'OK','',''),
(150,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_absence_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_absence_category\')','',152,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_absence_category to cw_general_validation_2_absence_category_bl','','2018-02-07 00:36:01','2019-02-25 18:36:21','','insert into cw_general_validation_2_absence_category_bl (version, general_validation_id, absence_category_id) select 0, general_validation_blacklist_absence_categories_id, absence_category_id from cw_general_validation_cw_absence_category where general_validation_blacklist_absence_categories_id is not null','insert into cw_general_validation_2_absence_category_bl (version, general_validation_id, absence_category_id) select 0, general_validation_blacklist_absence_categories_id, absence_category_id from cw_general_validation_cw_absence_category where general_validation_blacklist_absence_categories_id is not null',0,'condition is false','',''),
(151,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_absence_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_absence_category\')','',153,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_absence_category to cw_general_validation_2_absence_category_wl','','2018-02-07 00:36:01','2019-02-25 18:36:21','','insert into cw_general_validation_2_absence_category_wl (version, general_validation_id, absence_category_id) select 0, general_validation_whitelist_absence_categories_id, absence_category_id from cw_general_validation_cw_absence_category where general_validation_whitelist_absence_categories_id is not null','insert into cw_general_validation_2_absence_category_wl (version, general_validation_id, absence_category_id) select 0, general_validation_whitelist_absence_categories_id, absence_category_id from cw_general_validation_cw_absence_category where general_validation_whitelist_absence_categories_id is not null',0,'condition is false','',''),
(152,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_absence_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_absence\')','',154,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_absence to cw_general_validation_2_absence_wl','','2018-02-07 00:36:01','2019-02-25 18:36:21','','insert into cw_general_validation_2_absence_wl (version, general_validation_id, absence_id) select 0, general_validation_whitelist_absences_id, absence_id from cw_general_validation_cw_absence where general_validation_whitelist_absences_id is not null','insert into cw_general_validation_2_absence_wl (version, general_validation_id, absence_id) select 0, general_validation_whitelist_absences_id, absence_id from cw_general_validation_cw_absence where general_validation_whitelist_absences_id is not null',0,'condition is false','',''),
(153,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_project_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_project_category\')','',155,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_project_category to cw_general_validation_2_project_category_bl','','2018-02-07 00:36:01','2019-02-25 18:36:21','','insert into cw_general_validation_2_project_category_bl (version, general_validation_id, project_category_id) select 0, general_validation_blacklist_project_categories_id, project_category_id from cw_general_validation_cw_project_category where general_validation_blacklist_project_categories_id is not null','insert into cw_general_validation_2_project_category_bl (version, general_validation_id, project_category_id) select 0, general_validation_blacklist_project_categories_id, project_category_id from cw_general_validation_cw_project_category where general_validation_blacklist_project_categories_id is not null',0,'condition is false','',''),
(154,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_project_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_project_category\')','',156,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_project_category to cw_general_validation_2_project_category_wl','','2018-02-07 00:36:01','2019-02-25 18:36:21','','insert into cw_general_validation_2_project_category_wl (version, general_validation_id, project_category_id) select 0, general_validation_whitelist_project_categories_id, project_category_id from cw_general_validation_cw_project_category where general_validation_whitelist_project_categories_id is not null','insert into cw_general_validation_2_project_category_wl (version, general_validation_id, project_category_id) select 0, general_validation_whitelist_project_categories_id, project_category_id from cw_general_validation_cw_project_category where general_validation_whitelist_project_categories_id is not null',0,'condition is false','',''),
(155,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_project_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_project\')','',157,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_project to cw_general_validation_2_project_wl','','2018-02-07 00:36:01','2019-02-25 18:36:21','','insert into cw_general_validation_2_project_wl (version, general_validation_id, project_id) select 0, general_validation_whitelist_projects_id, project_id from cw_general_validation_cw_project where general_validation_whitelist_projects_id is not null','insert into cw_general_validation_2_project_wl (version, general_validation_id, project_id) select 0, general_validation_whitelist_projects_id, project_id from cw_general_validation_cw_project where general_validation_whitelist_projects_id is not null',0,'condition is false','',''),
(156,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_order_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_order_category\')','',158,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_order_category to cw_general_validation_2_order_category_bl','','2018-02-07 00:36:01','2019-02-25 18:36:21','','insert into cw_general_validation_2_order_category_bl (version, general_validation_id, order_category_id) select 0, general_validation_blacklist_order_categories_id, order_category_id from cw_general_validation_cw_order_category where general_validation_blacklist_order_categories_id is not null','insert into cw_general_validation_2_order_category_bl (version, general_validation_id, order_category_id) select 0, general_validation_blacklist_order_categories_id, order_category_id from cw_general_validation_cw_order_category where general_validation_blacklist_order_categories_id is not null',0,'condition is false','',''),
(157,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_order_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_order_category\')','',159,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_order_category to cw_general_validation_2_order_category_wl','','2018-02-07 00:36:02','2019-02-25 18:36:21','','insert into cw_general_validation_2_order_category_wl (version, general_validation_id, order_category_id) select 0, general_validation_whitelist_order_categories_id, order_category_id from cw_general_validation_cw_order_category where general_validation_whitelist_order_categories_id is not null','insert into cw_general_validation_2_order_category_wl (version, general_validation_id, order_category_id) select 0, general_validation_whitelist_order_categories_id, order_category_id from cw_general_validation_cw_order_category where general_validation_whitelist_order_categories_id is not null',0,'condition is false','',''),
(158,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_order_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_order\')','',160,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_order to cw_general_validation_2_order_wl','','2018-02-07 00:36:02','2019-02-25 18:36:21','','insert into cw_general_validation_2_order_wl (version, general_validation_id, order_id) select 0, general_validation_whitelist_orders_id, order_id from cw_general_validation_cw_order where general_validation_whitelist_orders_id is not null','insert into cw_general_validation_2_order_wl (version, general_validation_id, order_id) select 0, general_validation_whitelist_orders_id, order_id from cw_general_validation_cw_order where general_validation_whitelist_orders_id is not null',0,'condition is false','',''),
(159,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_order_item_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_order_item_category\')','',161,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_order_item_category to cw_general_validation_2_order_item_category_bl','','2018-02-07 00:36:02','2019-02-25 18:36:21','','insert into cw_general_validation_2_order_item_category_bl (version, general_validation_id, order_item_category_id) select 0, general_validation_blacklist_order_item_categories_id, order_item_category_id from cw_general_validation_cw_order_item_category where general_validation_blacklist_order_item_categories_id is not null','insert into cw_general_validation_2_order_item_category_bl (version, general_validation_id, order_item_category_id) select 0, general_validation_blacklist_order_item_categories_id, order_item_category_id from cw_general_validation_cw_order_item_category where general_validation_blacklist_order_item_categories_id is not null',0,'condition is false','',''),
(160,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_order_item_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_order_item_category\')','',162,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_order_item_category to cw_general_validation_2_order_item_category_wl','','2018-02-07 00:36:02','2019-02-25 18:36:21','','insert into cw_general_validation_2_order_item_category_wl (version, general_validation_id, order_item_category_id) select 0, general_validation_whitelist_order_item_categories_id, order_item_category_id from cw_general_validation_cw_order_item_category where general_validation_whitelist_order_item_categories_id is not null','insert into cw_general_validation_2_order_item_category_wl (version, general_validation_id, order_item_category_id) select 0, general_validation_whitelist_order_item_categories_id, order_item_category_id from cw_general_validation_cw_order_item_category where general_validation_whitelist_order_item_categories_id is not null',0,'condition is false','',''),
(161,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_order_item_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_order_item\')','',163,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_order_item to cw_general_validation_2_order_item_wl','','2018-02-07 00:36:02','2019-02-25 18:36:21','','insert into cw_general_validation_2_order_item_wl (version, general_validation_id, order_item_id) select 0, general_validation_whitelist_order_items_id, order_item_id from cw_general_validation_cw_order_item where general_validation_whitelist_order_items_id is not null','insert into cw_general_validation_2_order_item_wl (version, general_validation_id, order_item_id) select 0, general_validation_whitelist_order_items_id, order_item_id from cw_general_validation_cw_order_item where general_validation_whitelist_order_items_id is not null',0,'condition is false','',''),
(162,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_cost_unit_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_cost_unit_category\')','',164,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_cost_unit_category to cw_general_validation_2_cost_unit_category_bl','','2018-02-07 00:36:02','2019-02-25 18:36:21','','insert into cw_general_validation_2_cost_unit_category_bl (version, general_validation_id, cost_unit_category_id) select 0, general_validation_blacklist_cost_unit_categories_id, cost_unit_category_id from cw_general_validation_cw_cost_unit_category where general_validation_blacklist_cost_unit_categories_id is not null','insert into cw_general_validation_2_cost_unit_category_bl (version, general_validation_id, cost_unit_category_id) select 0, general_validation_blacklist_cost_unit_categories_id, cost_unit_category_id from cw_general_validation_cw_cost_unit_category where general_validation_blacklist_cost_unit_categories_id is not null',0,'condition is false','',''),
(163,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_cost_unit_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_cost_unit_category\')','',165,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_cost_unit_category to cw_general_validation_2_cost_unit_category_wl','','2018-02-07 00:36:02','2019-02-25 18:36:21','','insert into cw_general_validation_2_cost_unit_category_wl (version, general_validation_id, cost_unit_category_id) select 0, general_validation_whitelist_cost_unit_categories_id, cost_unit_category_id from cw_general_validation_cw_cost_unit_category where general_validation_whitelist_cost_unit_categories_id is not null','insert into cw_general_validation_2_cost_unit_category_wl (version, general_validation_id, cost_unit_category_id) select 0, general_validation_whitelist_cost_unit_categories_id, cost_unit_category_id from cw_general_validation_cw_cost_unit_category where general_validation_whitelist_cost_unit_categories_id is not null',0,'condition is false','',''),
(164,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_cost_unit_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_cost_unit\')','',166,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_cost_unit to cw_general_validation_2_cost_unit_wl','','2018-02-07 00:36:02','2019-02-25 18:36:21','','insert into cw_general_validation_2_cost_unit_wl (version, general_validation_id, cost_unit_id) select 0, general_validation_whitelist_cost_units_id, cost_unit_id from cw_general_validation_cw_cost_unit where general_validation_whitelist_cost_units_id is not null','insert into cw_general_validation_2_cost_unit_wl (version, general_validation_id, cost_unit_id) select 0, general_validation_whitelist_cost_units_id, cost_unit_id from cw_general_validation_cw_cost_unit where general_validation_whitelist_cost_units_id is not null',0,'condition is false','',''),
(165,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_machine_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_machine_category\')','',167,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_machine_category to cw_general_validation_2_machine_category_bl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_machine_category_bl (version, general_validation_id, machine_category_id) select 0, general_validation_blacklist_machine_categories_id, machine_category_id from cw_general_validation_cw_machine_category where general_validation_blacklist_machine_categories_id is not null','insert into cw_general_validation_2_machine_category_bl (version, general_validation_id, machine_category_id) select 0, general_validation_blacklist_machine_categories_id, machine_category_id from cw_general_validation_cw_machine_category where general_validation_blacklist_machine_categories_id is not null',0,'condition is false','',''),
(166,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_machine_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_machine_category\')','',168,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_machine_category to cw_general_validation_2_machine_category_wl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_machine_category_wl (version, general_validation_id, machine_category_id) select 0, general_validation_whitelist_machine_categories_id, machine_category_id from cw_general_validation_cw_machine_category where general_validation_whitelist_machine_categories_id is not null','insert into cw_general_validation_2_machine_category_wl (version, general_validation_id, machine_category_id) select 0, general_validation_whitelist_machine_categories_id, machine_category_id from cw_general_validation_cw_machine_category where general_validation_whitelist_machine_categories_id is not null',0,'condition is false','',''),
(167,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_machine_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_machine\')','',169,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_machine to cw_general_validation_2_machine_wl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_machine_wl (version, general_validation_id, machine_id) select 0, general_validation_whitelist_machines_id, machine_id from cw_general_validation_cw_machine where general_validation_whitelist_machines_id is not null','insert into cw_general_validation_2_machine_wl (version, general_validation_id, machine_id) select 0, general_validation_whitelist_machines_id, machine_id from cw_general_validation_cw_machine where general_validation_whitelist_machines_id is not null',0,'condition is false','',''),
(168,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_workplace_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_workplace_category\')','',170,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_workplace_category to cw_general_validation_2_workplace_category_bl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_workplace_category_bl (version, general_validation_id, workplace_category_id) select 0, general_validation_blacklist_workplace_categories_id, workplace_category_id from cw_general_validation_cw_workplace_category where general_validation_blacklist_workplace_categories_id is not null','insert into cw_general_validation_2_workplace_category_bl (version, general_validation_id, workplace_category_id) select 0, general_validation_blacklist_workplace_categories_id, workplace_category_id from cw_general_validation_cw_workplace_category where general_validation_blacklist_workplace_categories_id is not null',0,'condition is false','',''),
(169,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_workplace_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_workplace_category\')','',171,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_workplace_category to cw_general_validation_2_workplace_category_wl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_workplace_category_wl (version, general_validation_id, workplace_category_id) select 0, general_validation_whitelist_workplace_categories_id, workplace_category_id from cw_general_validation_cw_workplace_category where general_validation_whitelist_workplace_categories_id is not null','insert into cw_general_validation_2_workplace_category_wl (version, general_validation_id, workplace_category_id) select 0, general_validation_whitelist_workplace_categories_id, workplace_category_id from cw_general_validation_cw_workplace_category where general_validation_whitelist_workplace_categories_id is not null',0,'condition is false','',''),
(170,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_workplace_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_workplace\')','',172,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_workplace to cw_general_validation_2_workplace_wl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_workplace_wl (version, general_validation_id, workplace_id) select 0, general_validation_whitelist_workplaces_id, workplace_id from cw_general_validation_cw_workplace where general_validation_whitelist_workplaces_id is not null','insert into cw_general_validation_2_workplace_wl (version, general_validation_id, workplace_id) select 0, general_validation_whitelist_workplaces_id, workplace_id from cw_general_validation_cw_workplace where general_validation_whitelist_workplaces_id is not null',0,'condition is false','',''),
(171,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_workprocess_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_workprocess_category\')','',173,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_workprocess_category to cw_general_validation_2_workprocess_category_bl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_workprocess_category_bl (version, general_validation_id, workprocess_category_id) select 0, general_validation_blacklist_workprocess_categories_id, workprocess_category_id from cw_general_validation_cw_workprocess_category where general_validation_blacklist_workprocess_categories_id is not null','insert into cw_general_validation_2_workprocess_category_bl (version, general_validation_id, workprocess_category_id) select 0, general_validation_blacklist_workprocess_categories_id, workprocess_category_id from cw_general_validation_cw_workprocess_category where general_validation_blacklist_workprocess_categories_id is not null',0,'condition is false','',''),
(172,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_workprocess_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_workprocess_category\')','',174,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_workprocess_category to cw_general_validation_2_workprocess_category_wl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_workprocess_category_wl (version, general_validation_id, workprocess_category_id) select 0, general_validation_whitelist_workprocess_categories_id, workprocess_category_id from cw_general_validation_cw_workprocess_category where general_validation_whitelist_workprocess_categories_id is not null','insert into cw_general_validation_2_workprocess_category_wl (version, general_validation_id, workprocess_category_id) select 0, general_validation_whitelist_workprocess_categories_id, workprocess_category_id from cw_general_validation_cw_workprocess_category where general_validation_whitelist_workprocess_categories_id is not null',0,'condition is false','',''),
(173,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_workprocess_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_workprocess\')','',175,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_workprocess to cw_general_validation_2_workprocess_wl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_workprocess_wl (version, general_validation_id, workprocess_id) select 0, general_validation_whitelist_workprocesses_id, workprocess_id from cw_general_validation_cw_workprocess where general_validation_whitelist_workprocesses_id is not null','insert into cw_general_validation_2_workprocess_wl (version, general_validation_id, workprocess_id) select 0, general_validation_whitelist_workprocesses_id, workprocess_id from cw_general_validation_cw_workprocess where general_validation_whitelist_workprocesses_id is not null',0,'condition is false','',''),
(174,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_terminal_category_bl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_terminal_category\')','',176,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_terminal_category to cw_general_validation_2_terminal_category_bl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_terminal_category_bl (version, general_validation_id, terminal_category_id) select 0, general_validation_blacklist_terminal_categories_id, terminal_category_id from cw_general_validation_cw_terminal_category where general_validation_blacklist_terminal_categories_id is not null','insert into cw_general_validation_2_terminal_category_bl (version, general_validation_id, terminal_category_id) select 0, general_validation_blacklist_terminal_categories_id, terminal_category_id from cw_general_validation_cw_terminal_category where general_validation_blacklist_terminal_categories_id is not null',0,'condition is false','',''),
(175,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_terminal_category_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_terminal_category\')','',177,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_terminal_category to cw_general_validation_2_terminal_category_wl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_terminal_category_wl (version, general_validation_id, terminal_category_id) select 0, general_validation_whitelist_terminal_categories_id, terminal_category_id from cw_general_validation_cw_terminal_category where general_validation_whitelist_terminal_categories_id is not null','insert into cw_general_validation_2_terminal_category_wl (version, general_validation_id, terminal_category_id) select 0, general_validation_whitelist_terminal_categories_id, terminal_category_id from cw_general_validation_cw_terminal_category where general_validation_whitelist_terminal_categories_id is not null',0,'condition is false','',''),
(176,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_general_validation_2_terminal_wl\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_general_validation_cw_terminal\')','',178,'2018-02-07 00:35:56','\0','change table from cw_general_validation_cw_terminal to cw_general_validation_2_terminal_wl','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_general_validation_2_terminal_wl (version, general_validation_id, terminal_id) select 0, general_validation_whitelist_terminals_id, terminal_id from cw_general_validation_cw_terminal where general_validation_whitelist_terminals_id is not null','insert into cw_general_validation_2_terminal_wl (version, general_validation_id, terminal_id) select 0, general_validation_whitelist_terminals_id, terminal_id from cw_general_validation_cw_terminal where general_validation_whitelist_terminals_id is not null',0,'condition is false','',''),
(177,1,'','',179,'2018-02-07 00:35:56','\0','add GWT_ROLE','','2018-02-07 00:36:02','2018-02-07 00:36:02','','','',0,'OK','','\nimport at.clockwork.security.domain.*\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		Role gwtRole = Role.findByAuthority(\"ROLE_GWT\")\n		if (gwtRole) {\n			User.findAll().each { user ->\n				UserRole userRole = UserRole.findWhere(user:user, role:gwtRole)\n				if (!userRole) {\n					userRole = new UserRole(user:user, role:gwtRole)\n					userRole.save()\n				}\n			}\n		}\n\n		true\n	}\n}\n'),
(178,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_user\', \'deleted\')','',180,'2018-02-07 00:35:56','\0','init cw_user.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_user set deleted = 0 where deleted is null','update cw_user set deleted = false where deleted is null',0,'OK','',''),
(179,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_access_roles\')','',181,'2018-02-07 00:35:56','\0','init cw_general_validation.all_access_roles = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_general_validation set all_access_roles = 0 where all_access_roles is null','update cw_general_validation set all_access_roles = false where all_access_roles is null',0,'condition is false','',''),
(180,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_areas\')','',182,'2018-02-07 00:35:56','\0','init cw_general_validation.all_areas = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_general_validation set all_areas = 0 where all_areas is null','update cw_general_validation set all_areas = false where all_areas is null',0,'OK','',''),
(181,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_terminals\')','',183,'2018-02-07 00:35:56','\0','init cw_general_validation.all_terminals = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_general_validation set all_terminals = 0 where all_terminals is null','update cw_general_validation set all_terminals = false where all_terminals is null',0,'OK','',''),
(182,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'no_absence\')','',184,'2018-02-07 00:35:56','\0','init cw_general_validation.no_absence = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_general_validation set no_absence = 0 where no_absence is null','update cw_general_validation set no_absence = false where no_absence is null',0,'OK','',''),
(183,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_color\', \'deleted\')','',185,'2018-02-07 00:35:56','\0','init cw_color.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_color set deleted = 0 where deleted is null','update cw_color set deleted = false where deleted is null',0,'OK','',''),
(184,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'do_configure\')','',186,'2018-02-07 00:35:56','\0','drop cw_device.do_configure','','2018-02-07 00:36:02','2018-02-07 00:36:02','','alter table cw_device drop column do_configure','alter table cw_device drop column do_configure',0,'condition is false','',''),
(185,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_person_category_persons\')','',187,'2018-02-07 00:35:56','\0','delete cw_person_category_persons','','2018-02-07 00:36:02','2018-02-07 00:36:02','','delete from cw_person_category_persons','delete from cw_person_category_persons',0,'condition is false','',''),
(186,3,'','',188,'2018-02-07 00:35:56','\0','new identifications','','2018-02-07 00:36:02','2019-02-25 18:36:22','','','',0,'OK','','\nimport at.clockwork.common.domain.*\nimport at.clockwork.common.person.domain.*\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		if (at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_identification_2_identification_code\') == 0 &&\n			at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_person_2_identification\') == 0 &&\n			at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_identification_code\', \'identification_id\') &&\n			at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_identification\', \'person_id\')\n			) {\n\n			at.clockwork.system.service.DataSourceService.execute(\n				connection,\n				dataSourceFields,\n				[\n					mySQLStatement:\"insert into cw_person_2_identification (version, person_id, identification_id) select 0, person_id, id from cw_identification where person_id is not null\",\n					msSQLStatement:\"insert into cw_person_2_identification (version, person_id, identification_id) select 0, person_id, id from cw_identification where person_id is not null\"\n				]\n			)\n\n			at.clockwork.system.service.DataSourceService.execute(\n				connection,\n				dataSourceFields,\n				[\n					mySQLStatement:\"insert into cw_identification_2_identification_code (version, identification_id, identification_code_id) select 0, identification_id, id from cw_identification_code where identification_id is not null\",\n					msSQLStatement:\"insert into cw_identification_2_identification_code (version, identification_id, identification_code_id) select 0, identification_id, id from cw_identification_code where identification_id is not null\"\n				]\n			)\n\n			at.clockwork.system.service.DataSourceService.execute(\n				connection,\n				dataSourceFields,\n				[\n					mySQLStatement:\"update cw_identification_code set identification_id = null\",\n					msSQLStatement:\"update cw_identification_code set identification_id = null\"\n				]\n			)\n\n			at.clockwork.system.service.DataSourceService.execute(\n				connection,\n				dataSourceFields,\n				[\n					mySQLStatement:\"update cw_identification set person_id = null\",\n					msSQLStatement:\"update cw_identification set person_id = null\"\n				]\n			)\n\n			at.clockwork.system.service.DataSourceService.execute(\n				connection,\n				dataSourceFields,\n				[\n					mySQLStatement:\"alter table cw_identification drop column valid_from\",\n					msSQLStatement:\"alter table cw_identification drop column valid_from\"\n				]\n			)\n\n			at.clockwork.system.service.DataSourceService.execute(\n				connection,\n				dataSourceFields,\n				[\n					mySQLStatement:\"alter table cw_identification drop column valid_to\",\n					msSQLStatement:\"alter table cw_identification drop column valid_to\"\n				]\n			)\n		}\n\n		true\n	}\n}\n'),
(187,1,'','',189,'2018-02-07 00:35:56','\0','init cw_booking.changed = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_booking set changed = 0','update cw_booking set changed = false',0,'OK','',''),
(188,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_group_definition\', \'deleted\')','',190,'2018-02-07 00:35:56','\0','init cw_group_definition.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_group_definition set deleted = 0 where deleted is null','update cw_group_definition set deleted = false where deleted is null',0,'OK','',''),
(189,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_group_definition_detail\', \'deleted\')','',191,'2018-02-07 00:35:56','\0','init cw_group_definition_detail.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_group_definition_detail set deleted = 0 where deleted is null','update cw_group_definition_detail set deleted = false where deleted is null',0,'OK','',''),
(190,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_sort_definition\', \'deleted\')','',192,'2018-02-07 00:35:56','\0','init cw_sort_definition.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_sort_definition set deleted = 0 where deleted is null','update cw_sort_definition set deleted = false where deleted is null',0,'OK','',''),
(191,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_sort_definition_detail\', \'deleted\')','',193,'2018-02-07 00:35:56','\0','init cw_sort_definition_detail.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_sort_definition_detail set deleted = 0 where deleted is null','update cw_sort_definition_detail set deleted = false where deleted is null',0,'OK','',''),
(192,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_definition\', \'deleted\')','',194,'2018-02-07 00:35:56','\0','init cw_time_time_type_definition.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_time_time_type_definition set deleted = 0 where deleted is null','update cw_time_time_type_definition set deleted = false where deleted is null',0,'OK','',''),
(193,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_definition_detail\', \'deleted\')','',195,'2018-02-07 00:35:56','\0','init cw_time_time_type_definition_detail.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_time_time_type_definition_detail set deleted = 0 where deleted is null','update cw_time_time_type_definition_detail set deleted = false where deleted is null',0,'OK','',''),
(194,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_report_role_2_group_definition\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_role_cw_group_definition\')','',196,'2018-02-07 00:35:56','\0','change table cw_operator_role_cw_group_definition to cw_report_role_2_group_definition','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_report_role_2_group_definition (report_role_id, group_definition_id, version) select report_role_group_definitions_id, group_definition_id, 0  from cw_operator_role_cw_group_definition','insert into cw_report_role_2_group_definition (report_role_id, group_definition_id, version) select report_role_group_definitions_id, group_definition_id, 0  from cw_operator_role_cw_group_definition',0,'condition is false','',''),
(195,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_role_cw_group_definition\')','',197,'2018-02-07 00:35:56','\0','delete cw_operator_role_cw_group_definition','','2018-02-07 00:36:02','2018-02-07 00:36:02','','delete from cw_operator_role_cw_group_definition','delete from cw_operator_role_cw_group_definition',0,'condition is false','',''),
(196,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_report_role_2_sort_definition\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_role_cw_sort_definition\')','',198,'2018-02-07 00:35:56','\0','change table cw_operator_role_cw_sort_definition to cw_report_role_2_sort_definition','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_report_role_2_sort_definition (report_role_id, sort_definition_id, version) select report_role_sort_definitions_id, sort_definition_id, 0  from cw_operator_role_cw_sort_definition','insert into cw_report_role_2_sort_definition (report_role_id, sort_definition_id, version) select report_role_sort_definitions_id, sort_definition_id, 0  from cw_operator_role_cw_sort_definition',0,'condition is false','',''),
(197,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_role_cw_sort_definition\')','',199,'2018-02-07 00:35:56','\0','delete cw_operator_role_cw_sort_definition','','2018-02-07 00:36:02','2018-02-07 00:36:02','','delete from cw_operator_role_cw_sort_definition','delete from cw_operator_role_cw_sort_definition',0,'condition is false','',''),
(198,3,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_report_role_2_time_time_type_definition\') == 0 && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_role_cw_time_time_type_definition\')','',200,'2018-02-07 00:35:56','\0','change table cw_operator_role_cw_time_time_type_definition to cw_report_role_2_time_time_type_definition','','2018-02-07 00:36:02','2019-02-25 18:36:22','','insert into cw_report_role_2_time_time_type_definition (report_role_id, time_time_type_definition_id, version) select report_role_time_time_type_definitions_id, time_time_type_definition_id, 0  from cw_operator_role_cw_time_time_type_definition','insert into cw_report_role_2_time_time_type_definition (report_role_id, time_time_type_definition_id, version) select report_role_time_time_type_definitions_id, time_time_type_definition_id, 0  from cw_operator_role_cw_time_time_type_definition',0,'condition is false','',''),
(199,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_role_cw_time_time_type_definition\')','',201,'2018-02-07 00:35:56','\0','delete cw_operator_role_cw_time_time_type_definition','','2018-02-07 00:36:02','2018-02-07 00:36:02','','delete from cw_operator_role_cw_time_time_type_definition','delete from cw_operator_role_cw_time_time_type_definition',0,'condition is false','',''),
(200,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_role\', \'deleted\')','',202,'2018-02-07 00:35:56','\0','init cw_operator_role.deleted = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_operator_role set deleted = 0 where deleted is null','update cw_operator_role set deleted = false where deleted is null',0,'OK','',''),
(201,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_person_actual_time_info\')','',203,'2018-02-07 00:35:56','\0','delete cw_person_actual_time_info','','2018-02-07 00:36:02','2018-02-07 00:36:02','','delete from cw_person_actual_time_info','delete from cw_person_actual_time_info',0,'condition is false','',''),
(202,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_booking_log\')','',204,'2018-02-07 00:35:56','\0','delete cw_booking_log','','2018-02-07 00:36:02','2018-02-07 00:36:02','','delete from cw_booking_log','delete from cw_booking_log',0,'condition is false','',''),
(203,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_domain_class\', \'log_persistance\')','',205,'2018-02-07 00:35:56','\0','init cw_domain_class.log_persistance = false','','2018-02-07 00:36:02','2018-02-07 00:36:02','','update cw_domain_class set log_persistance = 0 where log_persistance is null','update cw_domain_class set log_persistance = false where log_persistance is null',0,'OK','',''),
(204,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_access_roles\')','',206,'2018-02-07 00:35:56','\0','drop cw_general_validation.all_access_roles','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_general_validation drop column all_access_roles','alter table cw_general_validation drop column all_access_roles',0,'condition is false','',''),
(205,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category\', \'class\')','',207,'2018-02-07 00:35:56','\0','drop cw_person_category.class','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_person_category drop column class','alter table cw_person_category drop column class',0,'condition is false','',''),
(206,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'planning_active\')','',208,'2018-02-07 00:35:56','\0','init cw_person.planning_active = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_person set planning_active = 0','update cw_person set planning_active = false',0,'condition is false','',''),
(207,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category_type\', \'time_active\')','',209,'2018-02-07 00:35:56','\0','init cw_person_category_type.time_active = true','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_person_category_type set time_active = 1','update cw_person_category_type set time_active = true',0,'OK','',''),
(208,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category_type\', \'work_active\')','',210,'2018-02-07 00:35:56','\0','init cw_person_category_type.work_active = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_person_category_type set work_active = 0','update cw_person_category_type set work_active = false',0,'OK','',''),
(209,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category_type\', \'access_active\')','',211,'2018-02-07 00:35:56','\0','init cw_person_category_type.access_active = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_person_category_type set access_active = 0','update cw_person_category_type set access_active = false',0,'OK','',''),
(210,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category_type\', \'planning_active\')','',212,'2018-02-07 00:35:56','\0','init cw_person_category_type.planning_active = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_person_category_type set planning_active = 0','update cw_person_category_type set planning_active = false',0,'OK','',''),
(211,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'visitor_active\')','',213,'2018-02-07 00:35:56','\0','init cw_person.visitor_active = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_person set visitor_active = 0','update cw_person set visitor_active = false',0,'condition is false','',''),
(212,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category_type\', \'visitor_active\')','',214,'2018-02-07 00:35:56','\0','init cw_person_category_type.visitor_active = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_person_category_type set visitor_active = 0','update cw_person_category_type set visitor_active = false',0,'OK','',''),
(213,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'approve\')','',215,'2018-02-07 00:35:56','\0','init cw_time_time_type.approve = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type set approve = 0','update cw_time_time_type set approve = false',0,'OK','',''),
(214,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'approve_all_persons\')','',216,'2018-02-07 00:35:56','\0','init cw_time_time_type.approve_all_persons = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type set approve_all_persons = 0','update cw_time_time_type set approve_all_persons = false',0,'OK','',''),
(215,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'is_used\')','',217,'2018-02-07 00:35:56','\0','drop cw_device.is_used','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_device drop column is_used','alter table cw_device drop column is_used',0,'condition is false','',''),
(216,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_booking\', \'changed\')','',218,'2018-02-07 00:35:56','\0','init cw_booking.changed','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_booking set changed=0 where changed is null','update cw_booking set changed=false where changed is null',0,'OK','',''),
(217,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'valid_from\')','',219,'2018-02-07 00:35:56','\0','drop cw_terminal.valid_from','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_terminal drop column valid_from','alter table cw_terminal drop column valid_from',0,'condition is false','',''),
(218,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'valid_to\')','',220,'2018-02-07 00:35:56','\0','drop cw_terminal.valid_to','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_terminal drop column valid_to','alter table cw_terminal drop column valid_to',0,'condition is false','',''),
(219,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'do_synchronize_date\')','',221,'2018-02-07 00:35:56','\0','drop cw_terminal.do_synchronize_date','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_terminal drop column do_synchronize_date','alter table cw_terminal drop column do_synchronize_date',0,'condition is false','',''),
(220,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'area_in\')','',222,'2018-02-07 00:35:56','\0','drop cw_terminal.area_in','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_terminal drop column area_in','alter table cw_terminal drop column area_in',0,'condition is false','',''),
(221,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'area_out\')','',223,'2018-02-07 00:35:56','\0','drop cw_terminal.area_out','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_terminal drop column area_out','alter table cw_terminal drop column area_out',0,'condition is false','',''),
(222,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_domain_class\', \'foxpro_spooling\')','',224,'2018-02-07 00:35:56','\0','update cw_domain_class.log_persistance','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_domain_class set log_persistance = 1 where foxpro_spooling = 1','update cw_domain_class set log_persistance = true where foxpro_spooling = true',0,'OK','',''),
(223,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_personal_pronoun\', \'deleted\')','',225,'2018-02-07 00:35:56','\0','init cw_personal_pronoun.deleted = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_personal_pronoun set deleted = 0 where deleted is null','update cw_personal_pronoun set deleted = false where deleted is null',0,'OK','',''),
(224,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_operator_role\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_detail\')','',226,'2018-02-07 00:35:56','\0','change table cw_user_operator_role to cw_user_2_operator_type','','2018-02-07 00:37:00','2018-02-07 00:37:00','','','',1,'OK','','\nimport at.clockwork.security.domain.*\n\nimport groovy.sql.Sql\nimport java.sql.Connection\nimport java.sql.DriverManager\nimport javax.sql.DataSource\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_user_2_operator_type_2_person_wl\",\n				msSQLStatement:\"delete from cw_user_2_operator_type_2_person_wl\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_user_2_operator_type_2_person_bl\",\n				msSQLStatement:\"delete from cw_user_2_operator_type_2_person_bl\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_user_2_operator_type_2_person_category_wl\",\n				msSQLStatement:\"delete from cw_user_2_operator_type_2_person_category_wl\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_user_2_operator_type_2_person_category_bl\",\n				msSQLStatement:\"delete from cw_user_2_operator_type_2_person_category_bl\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_user_2_operator_type\",\n				msSQLStatement:\"delete from cw_user_2_operator_type\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_operator_type_2_operation_role_2_personal_pronoun\",\n				msSQLStatement:\"delete from cw_operator_type_2_operation_role_2_personal_pronoun\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_operator_type_2_report_role_2_personal_pronoun\",\n				msSQLStatement:\"delete from cw_operator_type_2_report_role_2_personal_pronoun\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_operator_type_2_operation_role\",\n				msSQLStatement:\"delete from cw_operator_type_2_operation_role\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_operator_type_2_report_role\",\n				msSQLStatement:\"delete from cw_operator_type_2_report_role\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_operator_type_2_script\",\n				msSQLStatement:\"delete from cw_operator_type_2_script\"\n			]\n		)\n\n		resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"delete from cw_operator_type_2_menu\",\n				msSQLStatement:\"delete from cw_operator_type_2_menu\"\n			]\n		)\n\n		true\n	}\n}\n'),
(225,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_operator_role\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_detail\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_2_operation_role\') && at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_operator_type_2_operation_role\') == 0','',227,'2018-02-07 00:35:56','\0','change table cw_user_operator_role to cw_user_2_operator_type','','2018-02-07 00:37:00','2018-02-07 00:37:01','','','',1,'OK','','\nimport at.clockwork.common.domain.*\nimport at.clockwork.security.domain.*\n//import at.clockwork.security.operatorType.domain.*\n//import at.clockwork.security.user.domain.*\n\nimport groovy.sql.Sql\nimport java.sql.Connection\nimport java.sql.DriverManager\nimport javax.sql.DataSource\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		connection.eachRow(\"select id, operator_type_id, operator_role_id, general_validation_id from cw_operator_type_detail where class = \'at.clockwork.security.domain.OperatorTypeOperationDetail\' and operator_type_id is not null\") { operatorTypeDetail ->\n			def operatorType2OperationRole = new OperatorType2OperationRole(\n				operatorType:OperatorType.findWhere(id:(long)operatorTypeDetail?.operator_type_id ?: 0L),\n				operatorRole:OperatorRole.findWhere(id:(long)operatorTypeDetail?.operator_role_id ?: 0L),\n				generalValidation:GeneralValidation.findWhere(id:(long)operatorTypeDetail?.general_validation_id ?: 0L)\n			)\n			operatorType2OperationRole.save()\n			if (operatorType2OperationRole.hasErrors())\n				operatorType2OperationRole.errors.each { println it }\n\n			connection.eachRow(\'select operator_type_detail_personal_pronouns_id, personal_pronoun_id from cw_operator_type_detail_cw_personal_pronoun where operator_type_detail_personal_pronouns_id = \' + operatorTypeDetail.id) { personalPronoun ->\n				def operatorType2OperationRole2PersonalPronoun = new OperatorType2OperationRole2PersonalPronoun(\n					operatorType2OperatorRole:operatorType2OperationRole,\n					personalPronoun:PersonalPronoun.findWhere(id:(long)personalPronoun?.personal_pronoun_id ?: 0L)\n				)\n				operatorType2OperationRole2PersonalPronoun.save()\n				if (operatorType2OperationRole2PersonalPronoun.hasErrors())\n					operatorType2OperationRole2PersonalPronoun.errors.each { println it }\n\n			}\n\n		}\n\n\n		true\n	}\n}\n'),
(226,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_2_menu\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',228,'2018-02-07 00:35:56','\0','delete from cw_user_2_menu where menuName = \'menuAuthorisation\'','','2018-02-07 00:36:03','2018-02-07 00:36:03','','delete from cw_user_2_menu where menu_id in (select id from cw_menu where name = \'menuAuthorisation\') and user_id not in (select id from cw_user where username = \'clockwork\')','delete from cw_user_2_menu where menu_id in (select id from cw_menu where name = \'menuAuthorisation\') and user_id not in (select id from cw_user where username = \'clockwork\')',0,'OK','',''),
(227,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_role\', \'select_time_time_type\')','',229,'2018-02-07 00:35:56','\0','init cw_operator_role.select_time_time_type = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_operator_role set select_time_time_type = 0','update cw_operator_role set select_time_time_type = false',0,'OK','',''),
(228,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_model_2_detail\', \'day_enum\')','',230,'2018-02-07 00:35:56','\0','init cw_time_model_2_detail.day_enum = \'EVERY_DAY\'','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_model_2_detail set day_enum = \'EVERY_DAY\'','update cw_time_model_2_detail set day_enum = \'EVERY_DAY\'',0,'OK','',''),
(229,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'display_column_summary\')','',231,'2018-02-07 00:35:56','\0','drop cw_time_time_type.displayColumnSummary','','2018-02-07 00:37:01','2018-02-07 00:37:01','','alter table cw_time_time_type drop column display_column_summary','alter table cw_time_time_type drop column display_column_summary',1,'condition is false','',''),
(230,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_script_2_individual_field\', \'individual_field_data_type_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_script_2_individual_field\', \'data_type\')','',232,'2018-02-07 00:35:56','\0','init cw_script_2_individual_field.individual_field_data_type_enum = data_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_script_2_individual_field set individual_field_data_type_enum = data_type','update cw_script_2_individual_field set individual_field_data_type_enum = data_type',0,'condition is false','',''),
(231,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_script_2_individual_field\', \'data_type\')','',233,'2018-02-07 00:35:56','\0','drop cw_script_2_individual_field.data_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_script_2_individual_field drop column data_type','alter table cw_script_2_individual_field drop column data_type',0,'condition is false','',''),
(232,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'time_format_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'time_format\')','',234,'2018-02-07 00:35:56','\0','init cw_time_time_type.time_format_enum = time_format','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type set time_format_enum = time_format','update cw_time_time_type set time_format_enum = time_format',0,'condition is false','',''),
(233,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'time_format\')','',235,'2018-02-07 00:35:56','\0','drop cw_time_time_type.data_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_time_time_type drop column time_format','alter table cw_time_time_type drop column time_format',0,'condition is false','',''),
(234,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'close_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'time_ending\')','',236,'2018-02-07 00:35:56','\0','init cw_time_time_type.close_enum = time_ending','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type set close_enum = time_ending','update cw_time_time_type set close_enum = time_ending',0,'condition is false','',''),
(235,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'time_ending\')','',237,'2018-02-07 00:35:56','\0','drop cw_time_time_type.data_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_time_time_type drop column time_ending','alter table cw_time_time_type drop column time_ending',0,'condition is false','',''),
(236,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_definition_detail\', \'time_format_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_definition_detail\', \'time_format\')','',238,'2018-02-07 00:35:56','\0','init cw_time_time_type_definition_detail.time_format_enum = time_format','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type_definition_detail set time_format_enum = time_format','update cw_time_time_type_definition_detail set time_format_enum = time_format',0,'condition is false','',''),
(237,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_definition_detail\', \'time_format\')','',239,'2018-02-07 00:35:56','\0','drop cw_time_time_type_definition_detail.data_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_time_time_type_definition_detail drop column time_format','alter table cw_time_time_type_definition_detail drop column time_format',0,'condition is false','',''),
(238,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_work_time_type\', \'time_format_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_work_time_type\', \'time_format\')','',240,'2018-02-07 00:35:56','\0','init cw_work_time_type.time_format_enum = time_format','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_work_time_type set time_format_enum = time_format','update cw_work_time_type set time_format_enum = time_format',0,'condition is false','',''),
(239,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_work_time_type\', \'time_format\')','',241,'2018-02-07 00:35:56','\0','drop cw_work_time_type.data_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_work_time_type drop column time_format','alter table cw_work_time_type drop column time_format',0,'condition is false','',''),
(240,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'add_to_real_time\')','',242,'2018-02-07 00:35:56','\0','init cw_time_time_type.add_to_real_time = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type set add_to_real_time = 0','update cw_time_time_type set add_to_real_time = false',0,'OK','',''),
(241,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'is_initial_value\')','',243,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.is_initial_value = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type_data set is_initial_value = 0','update cw_time_time_type_data set is_initial_value = false',0,'condition is false','',''),
(242,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'initial_value\')','',244,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.initial_value = 0','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type_data set initial_value = 0','update cw_time_time_type_data set initial_value = 0',0,'OK','',''),
(243,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'total_value\')','',245,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.total_value = 0','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_time_time_type_data set total_value = 0','update cw_time_time_type_data set total_value = 0',0,'OK','',''),
(244,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'time_type\')','',246,'2018-02-07 00:35:56','\0','change table cw_absence.time_time to cw_absence.absence_time_type_enum','','2018-02-07 00:36:03','2018-02-07 00:36:03','','','',0,'condition is false','','\nimport at.clockwork.time.domain.Absence\n\nimport groovy.sql.Sql\nimport java.sql.Connection\nimport java.sql.DriverManager\nimport javax.sql.DataSource\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence set absence_time_type_enum = \'BY_THE_DAY\' where time_type = \'BYTHEDAY\'\",\n				msSQLStatement:\"update cw_absence set absence_time_type_enum = \'BY_THE_DAY\' where time_type = \'BYTHEDAY\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence set absence_time_type_enum = \'BY_THE_HOUR\' where time_type = \'BYTHEHOUR\'\",\n				msSQLStatement:\"update cw_absence set absence_time_type_enum = \'BY_THE_HOUR\' where time_type = \'BYTHEHOUR\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence set absence_time_type_enum = \'HALF_DAY\' where time_type = \'HALFDAY\'\",\n				msSQLStatement:\"update cw_absence set absence_time_type_enum = \'HALF_DAY\' where time_type = \'HALFDAY\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence set absence_time_type_enum = \'ANTE_MERIDIEM\' where time_type = \'ANTEMERIDIEM\'\",\n				msSQLStatement:\"update cw_absence set absence_time_type_enum = \'ANTE_MERIDIEM\' where time_type = \'ANTEMERIDIEM\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence set absence_time_type_enum = \'POST_MERIDIEM\' where time_type = \'POSTMERIDIEM\'\",\n				msSQLStatement:\"update cw_absence set absence_time_type_enum = \'POST_MERIDIEM\' where time_type = \'POSTMERIDIEM\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence set absence_time_type_enum = \'START_END\' where time_type = \'FROMTO\'\",\n				msSQLStatement:\"update cw_absence set absence_time_type_enum = \'START_END\' where time_type = \'FROMTO\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence set absence_time_type_enum = \'START_END\' where time_type = \'STARTEND\'\",\n				msSQLStatement:\"update cw_absence set absence_time_type_enum = \'START_END\' where time_type = \'STARTEND\'\"\n			]\n		)\n\n		true\n	}\n}\n'),
(245,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'time_type\')','',247,'2018-02-07 00:35:56','\0','drop cw_absence.time_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_absence drop column time_type','alter table cw_absence drop column time_type',0,'condition is false','',''),
(246,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'time_type_constant\')','',248,'2018-02-07 00:35:56','\0','drop cw_absence.time_type_constant','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_absence drop column time_type_constant','alter table cw_absence drop column time_type_constant',0,'condition is false','',''),
(247,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_type\')','',249,'2018-02-07 00:35:56','\0','change table cw_absence_planning_detail.time_time to cw_absence_planning_detail.absence_time_type_enum','','2018-02-07 00:36:03','2018-02-07 00:36:03','','','',0,'condition is false','','\nimport at.clockwork.time.domain.AbsencePlanningDetail\n\nimport groovy.sql.Sql\nimport java.sql.Connection\nimport java.sql.DriverManager\nimport javax.sql.DataSource\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'BY_THE_DAY\' where time_type = \'BYTHEDAY\'\",\n				msSQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'BY_THE_DAY\' where time_type = \'BYTHEDAY\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'BY_THE_HOUR\' where time_type = \'BYTHEHOUR\'\",\n				msSQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'BY_THE_HOUR\' where time_type = \'BYTHEHOUR\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'HALF_DAY\' where time_type = \'HALFDAY\'\",\n				msSQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'HALF_DAY\' where time_type = \'HALFDAY\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'ANTE_MERIDIEM\' where time_type = \'ANTEMERIDIEM\'\",\n				msSQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'ANTE_MERIDIEM\' where time_type = \'ANTEMERIDIEM\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'POST_MERIDIEM\' where time_type = \'POSTMERIDIEM\'\",\n				msSQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'POST_MERIDIEM\' where time_type = \'POSTMERIDIEM\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'START_END\' where time_type = \'FROMTO\'\",\n				msSQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'START_END\' where time_type = \'FROMTO\'\"\n			]\n		)\n\n		at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'START_END\' where time_type = \'STARTEND\'\",\n				msSQLStatement:\"update cw_absence_planning_detail set absence_time_type_enum = \'START_END\' where time_type = \'STARTEND\'\"\n			]\n		)\n\n		true\n	}\n}\n'),
(248,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence_planning_detail\', \'time_type\')','',250,'2018-02-07 00:35:56','\0','drop cw_absence_planning_detail.time_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_absence_planning_detail drop column time_type','alter table cw_absence_planning_detail drop column time_type',0,'condition is false','',''),
(249,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data_approval\', \'time_type_constant\')','',251,'2018-02-07 00:35:56','\0','drop cw_time_time_type_data_approval.time_type_constant','','2018-02-07 00:36:03','2018-02-07 00:36:03','','alter table cw_time_time_type_data_approval drop column time_type_constant','alter table cw_time_time_type_data_approval drop column time_type_constant',0,'condition is false','',''),
(250,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'calculate_the_next_day\')','',252,'2018-02-07 00:35:56','\0','init cw_absence.calculateTheNextDay = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_absence set deleted = 0 where calculate_the_next_day is null','update cw_absence set deleted = false where calculate_the_next_day is null',0,'OK','',''),
(251,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event_base_data\', \'done\')','',253,'2018-02-07 00:35:56','\0','init cw_event_base_data.done = false','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_event_base_data set done = 0 where done is null','update cw_event_base_data set done = false where done is null',0,'OK','',''),
(252,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'job_start_type_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'job_start_type\')','',254,'2018-02-07 00:35:56','\0','init cw_device.job_start_type_enum = job_start_type','','2018-02-07 00:36:03','2018-02-07 00:36:03','','update cw_device set job_start_type_enum = job_start_type','update cw_device set job_start_type_enum = job_start_type',0,'condition is false','',''),
(253,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'job_start_type_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'job_start_type\')','',255,'2018-02-07 00:35:56','\0','init cw_trigger.job_start_type_enum = job_start_type','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_trigger set job_start_type_enum = job_start_type','update cw_trigger set job_start_type_enum = job_start_type',0,'condition is false','',''),
(254,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'job_start_type_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'job_start_type\')','',256,'2018-02-07 00:35:56','\0','drop cw_device.job_start_type','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_device drop column job_start_type','alter table cw_device drop column job_start_type',0,'condition is false','',''),
(255,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'job_start_type_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'job_start_type\')','',257,'2018-02-07 00:35:56','\0','drop cw_trigger.job_start_type','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_trigger drop column job_start_type','alter table cw_trigger drop column job_start_type',0,'condition is false','',''),
(256,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_operator_role\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_detail\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_2_report_role\') && at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_operator_type_2_report_role\') == 0','',258,'2018-02-07 00:35:56','\0','change table cw_user_operator_role to cw_user_2_operator_type','','2018-02-07 00:37:01','2018-02-07 00:37:01','','','',1,'OK','','\nimport at.clockwork.common.domain.*\nimport at.clockwork.security.domain.*\n//import at.clockwork.security.operatorType.domain.*\n//import at.clockwork.security.user.domain.*\n\nimport groovy.sql.Sql\nimport java.sql.Connection\nimport java.sql.DriverManager\nimport javax.sql.DataSource\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		connection.eachRow(\"select id, operator_type_id, operator_role_id, general_validation_id from cw_operator_type_detail where class = \'at.clockwork.security.domain.OperatorTypeReportDetail\' and operator_type_id is not null\") { operatorTypeDetail ->\n\n			def operatorType2ReportRole = new OperatorType2ReportRole(\n				operatorType:OperatorType.findWhere(id:(long)operatorTypeDetail?.operator_type_id ?: 0L),\n				operatorRole:OperatorRole.findWhere(id:(long)operatorTypeDetail?.operator_role_id ?: 0L),\n				generalValidation:GeneralValidation.findWhere(id:(long)operatorTypeDetail?.general_validation_id ?: 0L)\n			)\n			operatorType2ReportRole.save()\n			if (operatorType2ReportRole.hasErrors())\n				operatorType2ReportRole.errors.each { println it }\n\n			connection.eachRow(\'select operator_type_detail_personal_pronouns_id, personal_pronoun_id from cw_operator_type_detail_cw_personal_pronoun where operator_type_detail_personal_pronouns_id = \' + operatorTypeDetail.id) { personalPronoun ->\n\n				def operatorType2ReportRole2PersonalPronoun = new OperatorType2ReportRole2PersonalPronoun(\n					operatorType2OperatorRole:operatorType2ReportRole,\n					personalPronoun:PersonalPronoun.findWhere(id:(long)personalPronoun?.personal_pronoun_id ?: 0L)\n				)\n				operatorType2ReportRole2PersonalPronoun.save()\n				if (operatorType2ReportRole2PersonalPronoun.hasErrors())\n					operatorType2ReportRole2PersonalPronoun.errors.each { println it }\n\n			}\n\n		}\n\n\n		true\n	}\n}\n'),
(257,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_operator_role\')','',259,'2018-02-07 00:35:56','\0','change table cw_user_operator_role to cw_user_2_operator_type','','2018-02-07 00:37:01','2018-02-07 00:37:01','','','',1,'OK','','\nimport at.clockwork.common.domain.*\nimport at.clockwork.security.domain.*\n//import at.clockwork.security.operatorType.domain.*\n//import at.clockwork.security.user.domain.*\n\nimport groovy.sql.Sql\nimport java.sql.Connection\nimport java.sql.DriverManager\nimport javax.sql.DataSource\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		connection.eachRow(\'select id, user_id, operator_type_id, person_category_id, general_validation_id from cw_user_operator_role where deleted = 0 and transfered_from_user_id is null\') { userOperatorRole ->\n\n			def user2OperatorType = new User2OperatorType(\n				user:User.findWhere(id:(long) (userOperatorRole.user_id) ),\n				operatorType:OperatorType.findWhere(id:(long) (userOperatorRole?.operator_type_id ?: 0L) ),\n				personCategory:PersonCategory.findWhere(id:(long) (userOperatorRole?.person_category_id ?: 0L) ),\n				generalValidation:GeneralValidation.findWhere(id:(long) (userOperatorRole?.general_validation_id ?: 0L) )\n			)\n			user2OperatorType.save()\n			if (user2OperatorType.hasErrors())\n				user2OperatorType.errors.each { println it }\n\n			connection.eachRow(\'select person_category_id, user_operator_role_whitelist_person_categories_id from cw_user_operator_role_cw_person_category where user_operator_role_whitelist_person_categories_id = \' + userOperatorRole.id) { whitelist ->\n\n				def user2OperatorType2PersonCategoryWhitelist = new User2OperatorType2PersonCategoryWhitelist(\n					user2OperatorType:user2OperatorType,\n					personCategory:PersonCategory.findWhere(id:(long) (whitelist?.person_category_id ?: 0L) )\n				)\n				user2OperatorType2PersonCategoryWhitelist.save()\n				if (user2OperatorType2PersonCategoryWhitelist.hasErrors())\n					user2OperatorType2PersonCategoryWhitelist.errors.each { println it }\n\n			}\n			connection.eachRow(\'select person_category_id, user_operator_role_blacklist_person_categories_id from cw_user_operator_role_cw_person_category where user_operator_role_blacklist_person_categories_id = \' + userOperatorRole.id) { blacklist ->\n\n				def user2OperatorType2PersonCategoryBlacklist = new User2OperatorType2PersonCategoryBlacklist(\n					user2OperatorType:user2OperatorType,\n					personCategory:PersonCategory.findWhere(id:(long) (blacklist?.person_category_id ?: 0L) )\n				)\n				user2OperatorType2PersonCategoryBlacklist.save()\n				if (user2OperatorType2PersonCategoryBlacklist.hasErrors())\n					user2OperatorType2PersonCategoryBlacklist.errors.each { println it }\n\n			}\n\n			connection.eachRow(\'select person_id, user_operator_role_whitelist_persons_id from cw_user_operator_role_cw_person where user_operator_role_whitelist_persons_id = \' + userOperatorRole.id) { whitelist ->\n\n				def user2OperatorType2PersonWhitelist = new User2OperatorType2PersonWhitelist(\n					user2OperatorType:user2OperatorType,\n					person:Person.findWhere(id:(long) (whitelist?.person_id ?: 0L) )\n				)\n				user2OperatorType2PersonWhitelist.save()\n				if (user2OperatorType2PersonWhitelist.hasErrors())\n					user2OperatorType2PersonWhitelist.errors.each { println it }\n\n			}\n\n			connection.eachRow(\'select person_id, user_operator_role_blacklist_persons_id from cw_user_operator_role_cw_person where user_operator_role_blacklist_persons_id = \' + userOperatorRole.id) { blacklist ->\n\n				def user2OperatorType2PersonBlacklist = new User2OperatorType2PersonBlacklist(\n					user2OperatorType:user2OperatorType,\n					person:Person.findWhere(id:(long) (blacklist?.person_id ?: 0L) )\n				)\n				user2OperatorType2PersonBlacklist.save()\n				if (user2OperatorType2PersonBlacklist.hasErrors())\n					user2OperatorType2PersonBlacklist.errors.each { println it }\n\n			}\n\n\n		}\n\n		true\n	}\n}\n'),
(258,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'close_enum\')','',260,'2018-02-07 00:35:56','\0','change cw_time_time_type.close_enum','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_time_time_type set close_enum = \'NOCLOSE\' WHERE close_enum = \'NOENDING\'','update cw_time_time_type set close_enum = \'NOCLOSE\' WHERE close_enum = \'NOENDING\'',0,'OK','',''),
(259,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'calculate_pause\')','',261,'2018-02-07 00:35:56','\0','init cw_absence.calculate_pause','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_absence set calculate_pause = 0 where calculate_pause is null','update cw_absence set calculate_pause = false where calculate_pause is null',0,'OK','',''),
(260,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'base_for_pause\')','',262,'2018-02-07 00:35:56','\0','init cw_absence.base_for_pause','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_absence set base_for_pause = 0 where base_for_pause is null','update cw_absence set base_for_pause = false where base_for_pause is null',0,'OK','',''),
(261,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'value_like_pause\')','',263,'2018-02-07 00:35:56','\0','init cw_absence.value_like_pause','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_absence set value_like_pause = 0 where value_like_pause is null','update cw_absence set value_like_pause = false where value_like_pause is null',0,'OK','',''),
(262,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data\', \'initialized\')','',264,'2018-02-07 00:35:56','\0','init cw_time_time_type_data.initialized','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_time_time_type_data set initialized = 0 where initialized is null','update cw_time_time_type_data set initialized = false where initialized is null',0,'OK','',''),
(263,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'base_year\')','',265,'2018-02-07 00:35:56','\0','init cw_terminal_key_flex.base_year','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_terminal_key_flex set base_year = 2004 where base_year is null or base_year = 0','update cw_terminal_key_flex set base_year = 2004 where base_year is null or base_year = 0',0,'OK','',''),
(264,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'gender_enum\')','',266,'2018-02-07 00:35:56','\0','init cw_person.gender_enum','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_person set gender_enum = \'MALE\'','update cw_person set gender_enum = \'MALE\'',0,'OK','',''),
(265,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category_type\', \'time_active\')','',267,'2018-02-07 00:35:56','\0','set cw_person_category_type.time_active','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_person_category_type set time_active = 1','update cw_person_category_type set time_active = true',0,'OK','',''),
(266,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'booking_pointer_start\')','',268,'2018-02-07 00:35:56','\0','drop cw_terminal_key_flex.booking_pointer_start','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_terminal_key_flex drop column booking_pointer_start','alter table cw_terminal_key_flex drop column booking_pointer_start',0,'condition is false','',''),
(267,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'booking_pointer_size\')','',269,'2018-02-07 00:35:56','\0','drop cw_terminal_key_flex.booking_pointer_size','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_terminal_key_flex drop column booking_pointer_size','alter table cw_terminal_key_flex drop column booking_pointer_size',0,'condition is false','',''),
(268,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'last_booking_information_start\')','',270,'2018-02-07 00:35:56','\0','drop cw_terminal_key_flex.last_booking_information_start','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_terminal_key_flex drop column last_booking_information_start','alter table cw_terminal_key_flex drop column last_booking_information_start',0,'condition is false','',''),
(269,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'last_booking_information_size\')','',271,'2018-02-07 00:35:56','\0','drop cw_terminal_key_flex.last_booking_information_size','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_terminal_key_flex drop column last_booking_information_size','alter table cw_terminal_key_flex drop column last_booking_information_size',0,'condition is false','',''),
(270,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'check_alternate_booking_type\')','',272,'2018-02-07 00:35:56','\0','init cw_terminal_key_flex.check_alternate_booking_type = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_terminal_key_flex set check_alternate_booking_type = 0 where check_alternate_booking_type is null','update cw_terminal_key_flex set check_alternate_booking_type = false where check_alternate_booking_type is null',0,'OK','',''),
(271,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'show_present_and_absent_persons\')','',273,'2018-02-07 00:35:56','\0','init cw_terminal_key_flex.show_present_and_absent_persons = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_terminal_key_flex set show_present_and_absent_persons = 0 where show_present_and_absent_persons is null','update cw_terminal_key_flex set show_present_and_absent_persons = false where show_present_and_absent_persons is null',0,'OK','',''),
(272,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'show_present_persons\')','',274,'2018-02-07 00:35:56','\0','init cw_terminal_key_flex.show_present_persons = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_terminal_key_flex set show_present_persons = 0 where show_present_persons is null','update cw_terminal_key_flex set show_present_persons = false where show_present_persons is null',0,'OK','',''),
(273,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'number_of_persons\')','',275,'2018-02-07 00:35:56','\0','init cw_terminal_key_flex.number_of_persons = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_terminal_key_flex set number_of_persons = 0 where number_of_persons is null','update cw_terminal_key_flex set number_of_persons = 0 where number_of_persons is null',0,'OK','',''),
(274,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'duration_of_beep\')','',276,'2018-02-07 00:35:56','\0','init cw_terminal_key_flex.duration_of_beep = 0','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_terminal_key_flex set duration_of_beep = 0 where duration_of_beep is null','update cw_terminal_key_flex set duration_of_beep = 0 where duration_of_beep is null',0,'OK','',''),
(275,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_communication\', \'terminal_command_cw_id\')','',277,'2018-02-07 00:35:56','\0','init cw_terminal_communication.terminal_command_cw_id = 0','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_terminal_communication set terminal_command_cw_id = 0','update cw_terminal_communication set terminal_command_cw_id = 0',0,'OK','',''),
(276,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data_transfer\', \'time_time_type_id\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data_transfer\', \'time_time_type_plus1_id\')','',278,'2018-02-07 00:35:56','\0','init cw_time_time_type_data_transfer.time_time_type_plus1_id','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_time_time_type_data_transfer set time_time_type_plus1_id = time_time_type_id','update cw_time_time_type_data_transfer set time_time_type_plus1_id = time_time_type_id',0,'condition is false','',''),
(277,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data_transfer\', \'time_time_type_id\')','',279,'2018-02-07 00:35:56','\0','drop cw_time_time_type_data_transfer.time_time_type_id','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_time_time_type_data_transfer drop column time_time_type_id','alter table cw_time_time_type_data_transfer drop column time_time_type_id',0,'condition is false','',''),
(278,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data_transfer\', \'time_transfer_enum\') && at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data_transfer\', \'time_transfer_plus1enum\')','',280,'2018-02-07 00:35:56','\0','init cw_time_time_type_data_transfer.time_transfer_plus1enum','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_time_time_type_data_transfer set time_transfer_plus1enum = time_transfer_enum','update cw_time_time_type_data_transfer set time_transfer_plus1enum = time_transfer_enum',0,'condition is false','',''),
(279,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data_transfer\', \'time_transfer_enum\')','',281,'2018-02-07 00:35:56','\0','drop cw_time_time_type_data_transfer.time_transfer_enum','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_time_time_type_data_transfer drop column time_transfer_enum','alter table cw_time_time_type_data_transfer drop column time_transfer_enum',0,'condition is false','',''),
(280,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_work_time_type_data\', \'tza\')','',283,'2018-02-07 00:35:56','\0','drop cw_work_time_type_data.tza','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_work_time_type_data drop column tza','alter table cw_work_time_type_data drop column tza',0,'condition is false','',''),
(281,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'time_active\')','',284,'2018-02-07 00:35:56','\0','drop cw_person.time_active','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_person drop column time_active','alter table cw_person drop column time_active',0,'condition is false','',''),
(282,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'work_active\')','',285,'2018-02-07 00:35:56','\0','drop cw_person.work_active','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_person drop column work_active','alter table cw_person drop column work_active',0,'condition is false','',''),
(283,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'access_active\')','',286,'2018-02-07 00:35:56','\0','drop cw_person.access_active','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_person drop column access_active','alter table cw_person drop column access_active',0,'condition is false','',''),
(284,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'planning_active\')','',287,'2018-02-07 00:35:56','\0','drop cw_person.planning_active','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_person drop column planning_active','alter table cw_person drop column planning_active',0,'condition is false','',''),
(285,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'visitor_active\')','',288,'2018-02-07 00:35:56','\0','drop cw_person.visitor_active','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_person drop column visitor_active','alter table cw_person drop column visitor_active',0,'condition is false','',''),
(286,3,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_terminal_cw_door_state_definition\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_terminal_2_door_state_definition\')','',289,'2018-02-07 00:35:56','\0','change table from cw_terminal_cw_door_state_definition to cw_terminal_2_door_state_definition','','2018-02-07 00:36:04','2019-02-25 18:36:22','','insert into cw_terminal_2_door_state_definition (terminal_id, door_state_definition_id, deleted, version, date_created, last_updated, update_counter) select terminal_door_state_definitions_id, door_state_definition_id, 0, 0, getdate(), getdate(), 0 from cw_terminal_cw_door_state_definition','insert into cw_terminal_2_door_state_definition (terminal_id, door_state_definition_id, deleted, version, date_created, last_updated, update_counter) select terminal_door_state_definitions_id, door_state_definition_id, false, 0, curdate(), curdate(), 0 from cw_terminal_cw_door_state_definition',0,'condition is false','',''),
(287,3,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_terminal_cw_identification_type\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_terminal_2_identification_type\')','',290,'2018-02-07 00:35:56','\0','change table from cw_terminal_cw_identification_type to cw_terminal_2_identification_type','','2018-02-07 00:36:04','2019-02-25 18:36:22','','insert into cw_terminal_2_identification_type (terminal_id, identification_type_id, deleted, version, date_created, last_updated, update_counter) select terminal_identification_types_id, identification_type_id, 0, 0, getdate(), getdate(), 0 from cw_terminal_cw_identification_type','insert into cw_terminal_2_identification_type (terminal_id, identification_type_id, deleted, version, date_created, last_updated, update_counter) select terminal_identification_types_id, identification_type_id, false, 0, curdate(), curdate(), 0 from cw_terminal_cw_identification_type',0,'condition is false','',''),
(288,3,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_terminal_cw_terminal\') && at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_terminal_2_by_update_data_dependent_terminal\')','',291,'2018-02-07 00:35:56','\0','change table from cw_terminal_cw_terminal to cw_terminal_2_by_update_data_dependent_terminal','','2018-02-07 00:36:04','2019-02-25 18:36:22','','insert into cw_terminal_2_by_update_data_dependent_terminal (terminal_id, by_update_data_dependent_terminal_id, deleted, version, date_created, last_updated, update_counter) select terminal_update_data_depends_on_terminals_id, terminal_id, 0, 0, getdate(), getdate(), 0 from cw_terminal_cw_terminal','insert into cw_terminal_2_by_update_data_dependent_terminal (terminal_id, by_update_data_dependent_terminal_id, deleted, version, date_created, last_updated, update_counter) select terminal_update_data_depends_on_terminals_id, terminal_id, false, 0, curdate(), curdate(), 0 from cw_terminal_cw_terminal',0,'condition is false','',''),
(289,1,'','',292,'2018-02-07 00:35:56','\0','clean systemConfiguration 2','','2018-02-07 00:36:04','2018-02-07 00:36:04','','','',0,'OK','','\nimport at.clockwork.system.service.SystemConfigurationService\n\nimport grails.util.Holders\n\n\n\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		def systemConfigurationService = Holders.grailsApplication.mainContext.getBean \'systemConfigurationService\'\n\n		systemConfigurationService.deleteByCwID(3)\n\n		true\n	}\n}\n'),
(290,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'time_type\')','',293,'2018-02-07 00:35:56','\0','drop cw_absence.time_type','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_absence drop column time_type','alter table cw_absence drop column time_type',0,'condition is false','',''),
(291,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'time_type_constant\')','',294,'2018-02-07 00:35:56','\0','drop cw_absence.time_type_constant','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_absence drop column time_type_constant','alter table cw_absence drop column time_type_constant',0,'condition is false','',''),
(292,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'mobile_client\')','',295,'2018-02-07 00:35:56','\0','init cw_absence.mobileClient = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_absence set mobile_client = 0','update cw_absence set mobile_client = false',0,'OK','',''),
(293,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_project\', \'mobile_client\')','',296,'2018-02-07 00:35:56','\0','init cw_project.mobileClient = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_project set mobile_client = 0','update cw_project set mobile_client = false',0,'OK','',''),
(294,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'mobile_client\')','',297,'2018-02-07 00:35:56','\0','init cw_order.mobileClient = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_order set mobile_client = 0','update cw_order set mobile_client = false',0,'OK','',''),
(295,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_client\', \'mobile_client\')','',298,'2018-02-07 00:35:56','\0','init cw_order_client.mobileClient = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_order_item set mobile_client = 0','update cw_order_client set mobile_client = false',0,'condition is false','',''),
(296,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_cost_unit\', \'mobile_client\')','',299,'2018-02-07 00:35:56','\0','init cw_cost_unit.mobileClient = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_cost_unit set mobile_client = 0','update cw_cost_unit set mobile_client = false',0,'OK','',''),
(297,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_machine\', \'mobile_client\')','',300,'2018-02-07 00:35:56','\0','init cw_machine.mobileClient = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_machine set mobile_client = 0','update cw_machine set mobile_client = false',0,'OK','',''),
(298,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workplace\', \'mobile_client\')','',301,'2018-02-07 00:35:56','\0','init cw_project.mobileClient = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_workplace set mobile_client = 0','update cw_workplace set mobile_client = false',0,'OK','',''),
(299,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workprocess\', \'mobile_client\')','',302,'2018-02-07 00:35:56','\0','init cw_workprocess.mobileClient = false','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_workprocess set mobile_client = 0','update cw_workprocess set mobile_client = false',0,'OK','',''),
(300,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'state\')','',303,'2018-02-07 00:35:56','\0','drop cw_order.state','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_order drop column state','alter table cw_order drop column state',0,'condition is false','',''),
(301,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item\', \'state\')','',304,'2018-02-07 00:35:56','\0','drop cw_order_item.state','','2018-02-07 00:36:04','2018-02-07 00:36:04','','alter table cw_order_item drop column state','alter table cw_order_item drop column state',0,'condition is false','',''),
(302,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'order_state_enum\')','',305,'2018-02-07 00:35:56','\0','init cw_order.order_state_enum = \'NONE\'','','2018-02-07 00:36:04','2018-02-07 00:36:04','','update cw_order set order_state_enum = \'NONE\'','update cw_order set order_state_enum = \'NONE\'',0,'OK','',''),
(303,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item\', \'order_state_enum\')','',306,'2018-02-07 00:35:56','\0','init cw_order_item.order_state_enum = \'NONE\'','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_order_item set order_state_enum = \'NONE\'','update cw_order_item set order_state_enum = \'NONE\'',0,'condition is false','',''),
(304,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_category_type\', \'ticket_system_active\')','',307,'2018-02-07 00:35:56','\0','init cw_person_category_type.ticket_system_active = false','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_person_category_type set ticket_system_active = 0','update cw_person_category_type set ticket_system_active = false',0,'OK','',''),
(305,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'duration_of_beep\')','',308,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.duration_of_beep = 0','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_terminal_key_flex set duration_of_beep = 0 where duration_of_beep is null','update cw_terminal_key_flex set duration_of_beep = 0 where duration_of_beep is null',0,'OK','',''),
(306,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'unlocking_time\')','',310,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.unlocking_time = 0','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_terminal_key_flex set unlocking_time = 0 where unlocking_time is null','update cw_terminal_key_flex set unlocking_time = 0 where unlocking_time is null',0,'OK','',''),
(307,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'number_of_impulse\')','',312,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.number_of_impulse = 0','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_terminal_key_flex set number_of_impulse = 0 where number_of_impulse is null','update cw_terminal_key_flex set number_of_impulse = 0 where number_of_impulse is null',0,'OK','',''),
(308,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'log_invalid_booking\')','',314,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.log_invalid_booking = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set log_invalid_booking = 0 where log_invalid_booking is null','update cw_terminal_key_flex set log_invalid_booking = 0 where log_invalid_booking is null',0,'OK','',''),
(309,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'set_relay2parallel_to_relay1\')','',316,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.set_relay2parallel_to_relay1 = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set set_relay2parallel_to_relay1 = 0 where set_relay2parallel_to_relay1 is null','update cw_terminal_key_flex set set_relay2parallel_to_relay1 = 0 where set_relay2parallel_to_relay1 is null',0,'OK','',''),
(310,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'time_of_parallel_circuit_in_seconds\')','',318,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.time_of_parallel_circuit_in_seconds = 0','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_terminal_key_flex set time_of_parallel_circuit_in_seconds = 0 where time_of_parallel_circuit_in_seconds is null','update cw_terminal_key_flex set time_of_parallel_circuit_in_seconds = 0 where time_of_parallel_circuit_in_seconds is null',0,'OK','',''),
(311,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'show_state_of_input_at_booking\')','',320,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.show_state_of_input_at_booking = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set show_state_of_input_at_booking = 0 where show_state_of_input_at_booking is null','update cw_terminal_key_flex set show_state_of_input_at_booking = 0 where show_state_of_input_at_booking is null',0,'OK','',''),
(312,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'enable_unlocking_button\')','',322,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.enable_unlocking_button = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set enable_unlocking_button = 0 where enable_unlocking_button is null','update cw_terminal_key_flex set enable_unlocking_button = 0 where enable_unlocking_button is null',0,'OK','',''),
(313,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'enable_door_control\')','',324,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.enable_door_control = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set enable_door_control = 0 where enable_door_control is null','update cw_terminal_key_flex set enable_door_control = 0 where enable_door_control is null',0,'OK','',''),
(314,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'enable_too_long_open_alarm\')','',326,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.enable_too_long_open_alarm = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set enable_too_long_open_alarm = 0 where enable_too_long_open_alarm is null','update cw_terminal_key_flex set enable_too_long_open_alarm = 0 where enable_too_long_open_alarm is null',0,'OK','',''),
(315,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'save_each_door_state_change\')','',328,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.save_each_door_state_change = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set save_each_door_state_change = 0 where save_each_door_state_change is null','update cw_terminal_key_flex set save_each_door_state_change = 0 where save_each_door_state_change is null',0,'OK','',''),
(316,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'deactivate_antenna_if_input_set\')','',330,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.deactivate_antenna_if_input_set = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set deactivate_antenna_if_input_set = 0 where deactivate_antenna_if_input_set is null','update cw_terminal_key_flex set deactivate_antenna_if_input_set = 0 where deactivate_antenna_if_input_set is null',0,'OK','',''),
(317,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'save_illegal_entry\')','',332,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.save_illegal_entry = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set save_illegal_entry = 0 where save_illegal_entry is null','update cw_terminal_key_flex set save_illegal_entry = 0 where save_illegal_entry is null',0,'OK','',''),
(318,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'time_of_setting_transistor\')','',334,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.time_of_setting_transistor = 0','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_terminal_key_flex set time_of_setting_transistor = 0 where time_of_setting_transistor is null','update cw_terminal_key_flex set time_of_setting_transistor = 0 where time_of_setting_transistor is null',0,'OK','',''),
(319,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'activate_relay2\')','',336,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.activate_relay2 = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set activate_relay2 = 0 where activate_relay2 is null','update cw_terminal_key_flex set activate_relay2 = 0 where activate_relay2 is null',0,'OK','',''),
(320,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'input1checks_if_alarm_system_is_ready_to_turn_sharply\')','',338,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.input1checks_if_alarm_system_is_ready_to_turn_sharply = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set input1checks_if_alarm_system_is_ready_to_turn_sharply = 0 where input1checks_if_alarm_system_is_ready_to_turn_sharply is null','update cw_terminal_key_flex set input1checks_if_alarm_system_is_ready_to_turn_sharply = 0 where input1checks_if_alarm_system_is_ready_to_turn_sharply is null',0,'OK','',''),
(321,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'individual_control_data\')','',340,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.individual_control_data = \'\'','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_terminal_key_flex set individual_control_data = \'\' where individual_control_data is null','update cw_terminal_key_flex set individual_control_data = \'\' where individual_control_data is null',0,'OK','',''),
(322,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'individual_control_data2\')','',342,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.individual_control_data2 = \'\'','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_terminal_key_flex set individual_control_data2 = \'\' where individual_control_data2 is null','update cw_terminal_key_flex set individual_control_data2 = \'\' where individual_control_data2 is null',0,'OK','',''),
(323,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'number_of_relays\')','',344,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.number_of_relays = 1','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set number_of_relays = 1 where number_of_relays is null or number_of_relays = 0','update cw_terminal_key_flex set number_of_relays = 1 where number_of_relays is null or number_of_relays = 0',0,'OK','',''),
(324,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'activate_relay3\')','',346,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.activate_relay3 = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set activate_relay3 = 0 where activate_relay3 is null','update cw_terminal_key_flex set activate_relay3 = 0 where activate_relay3 is null',0,'OK','',''),
(325,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'activate_relay4\')','',348,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.activate_relay4 = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set activate_relay4 = 0 where activate_relay4 is null','update cw_terminal_key_flex set activate_relay4 = 0 where activate_relay4 is null',0,'OK','',''),
(326,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'activate_relay5\')','',350,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.activate_relay5 = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set activate_relay5 = 0 where activate_relay5 is null','update cw_terminal_key_flex set activate_relay5 = 0 where activate_relay5 is null',0,'OK','',''),
(327,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'activate_relay6\')','',352,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.activate_relay6 = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_terminal_key_flex set activate_relay6 = 0 where activate_relay6 is null','update cw_terminal_key_flex set activate_relay6 = 0 where activate_relay6 is null',0,'OK','',''),
(328,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'parallel_circuit\')','',354,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.parallel_circuit = \'STATIC_OFF\'','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_terminal_key_flex set parallel_circuit = \'STATIC_OFF\' where parallel_circuit is null','update cw_terminal_key_flex set parallel_circuit = \'STATIC_OFF\' where parallel_circuit is null',0,'OK','',''),
(329,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',355,'2018-02-07 00:35:57','\0','delete from cw_menu where name = \'keyflexTerminal\' - part 1','','2018-02-07 00:36:05','2018-02-07 00:36:05','','delete from cw_operator_type_2_menu where menu_id in (select id from cw_menu where name = \'keyflexTerminal\');','delete from cw_operator_type_2_menu where menu_id in (select id from cw_menu where name = \'keyflexTerminal\')',0,'OK','',''),
(330,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',356,'2018-02-07 00:35:57','\0','delete from cw_menu where name = \'keyflexTerminal\' - part 2','','2018-02-07 00:36:05','2018-02-07 00:36:05','','delete from cw_user_2_menu where menu_id in (select id from cw_menu where name = \'keyflexTerminal\');','delete from cw_user_2_menu where menu_id in (select id from cw_menu where name = \'keyflexTerminal\')',0,'OK','',''),
(331,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',357,'2018-02-07 00:35:57','\0','delete from cw_menu where name = \'keyflexTerminal\' - part 3','','2018-02-07 00:36:05','2018-02-07 00:36:05','','delete from cw_menu where name = \'keyflexTerminal\';','delete from cw_menu where name = \'keyflexTerminal\';',0,'OK','',''),
(332,1,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_time_time_type_category\')==0','',358,'2018-02-07 00:35:57','\0','insert into cw_time_time_type_category','','2018-02-07 00:36:05','2018-02-07 00:36:05','','','',0,'OK','','import at.clockwork.time.timeType.domain.*\n			\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		boolean error = true\n\n		new TimeTimeTypeCategory(description_de:\"Standard\").save()\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_time_time_type set time_time_type_category_id = 1 where time_time_type_category_id is null or time_time_type_category_id = 0\",\n				msSQLStatement:\"update cw_time_time_type set time_time_type_category_id = 1 where time_time_type_category_id is null or time_time_type_category_id = 0\"\n			]\n		)\n			\n		error\n	}\n}'),
(333,1,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_time_time_model_category\')==0','',359,'2018-02-07 00:35:57','\0','insert into cw_time_time_model_category','','2018-02-07 00:36:05','2018-02-07 00:36:05','','','',0,'OK','','import at.clockwork.time.timeModel.domain.*\n			\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		boolean error = true\n\n		new TimeTimeModelCategory(description_de:\"Standard\").save()\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_time_time_model set time_time_model_category_id = 1 where time_time_model_category_id is null or time_time_model_category_id = 0\",\n				msSQLStatement:\"update cw_time_time_model set time_time_model_category_id = 1 where time_time_model_category_id is null or time_time_model_category_id = 0\"\n			]\n		)\n			\n		error\n	}\n}'),
(334,1,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_time_time_plan_category\')==0','',360,'2018-02-07 00:35:57','\0','insert into cw_time_time_plan_category','','2018-02-07 00:36:05','2018-02-07 00:36:05','','','',0,'OK','','import at.clockwork.time.timePlan.domain.*\n			\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		boolean error = true\n\n		new TimeTimePlanCategory(description_de:\"Standard\").save()\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_time_time_plan set time_time_plan_category_id = 1 where time_time_plan_category_id is null or time_time_plan_category_id = 0\",\n				msSQLStatement:\"update cw_time_time_plan set time_time_plan_category_id = 1 where time_time_plan_category_id is null or time_time_plan_category_id = 0\"\n			]\n		)\n			\n		error\n	}\n}'),
(335,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_companies\')','',361,'2018-02-07 00:35:57','\0','init cw_general_validation.all_companies = false','','2018-02-07 00:36:05','2022-11-04 07:48:15','','update cw_general_validation set all_companies = 0 where all_companies is null','update cw_general_validation set all_companies = 0 where all_companies is null',0,'OK','',''),
(336,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',362,'2018-02-07 00:35:57','\0','change menu personTimeOverview to viewAbsenceOverview - part 1','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_operator_type_2_menu set menu_id = (select id from cw_menu where name = \'viewAbsenceOverview\') where menu_id in (select id from cw_menu where name = \'personTimeOverview\')','update cw_operator_type_2_menu set menu_id = (select id from cw_menu where name = \'viewAbsenceOverview\') where menu_id in (select id from cw_menu where name = \'personTimeOverview\')',0,'OK','',''),
(337,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',363,'2018-02-07 00:35:57','\0','change menu personTimeOverview to viewAbsenceOverview - part 2','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_user_2_menu set menu_id = (select id from cw_menu where name = \'viewAbsenceOverview\') where user_id != 1 and menu_id in (select id from cw_menu where name = \'personTimeOverview\')','update cw_user_2_menu set menu_id = (select id from cw_menu where name = \'viewAbsenceOverview\') where user_id != 1 and menu_id in (select id from cw_menu where name = \'personTimeOverview\')',0,'OK','',''),
(338,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',364,'2018-02-07 00:35:57','\0','change menu personTimeOverview to viewAbsenceOverview - part 3','','2018-02-07 00:36:05','2018-02-07 00:36:05','','delete from cw_user_2_menu where user_id = 1 and menu_id in (select id from cw_menu where name = \'personTimeOverview\')','delete from cw_user_2_menu where user_id = 1 and menu_id in (select id from cw_menu where name = \'personTimeOverview\')',0,'OK','',''),
(339,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',365,'2018-02-07 00:35:57','\0','change menu personTimeOverview to viewAbsenceOverview - part 4','','2018-02-07 00:36:05','2018-02-07 00:36:05','','delete from cw_menu where name = \'personTimeOverview\'','delete from cw_menu where name = \'personTimeOverview\'',0,'OK','',''),
(340,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',366,'2018-02-07 00:35:57','\0','change menu viewPresenceAbsence to viewPresenceAbsenceOverview - part 1','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_operator_type_2_menu set menu_id = (select id from cw_menu where name = \'viewPresenceAbsenceOverview\') where menu_id in (select id from cw_menu where name = \'viewPresenceAbsence\')','update cw_operator_type_2_menu set menu_id = (select id from cw_menu where name = \'viewPresenceAbsenceOverview\') where menu_id in (select id from cw_menu where name = \'viewPresenceAbsence\')',0,'OK','',''),
(341,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',367,'2018-02-07 00:35:57','\0','change menu viewPresenceAbsence to viewPresenceAbsenceOverview - part 2','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_user_2_menu set menu_id = (select id from cw_menu where name = \'viewPresenceAbsenceOverview\') where user_id != 1 and menu_id in (select id from cw_menu where name = \'viewPresenceAbsence\')','update cw_user_2_menu set menu_id = (select id from cw_menu where name = \'viewPresenceAbsenceOverview\') where user_id != 1 and menu_id in (select id from cw_menu where name = \'viewPresenceAbsence\')',0,'OK','',''),
(342,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',368,'2018-02-07 00:35:57','\0','change menu viewPresenceAbsence to viewPresenceAbsenceOverview - part 3','','2018-02-07 00:36:05','2018-02-07 00:36:05','','delete from cw_user_2_menu where user_id = 1 and menu_id in (select id from cw_menu where name = \'viewPresenceAbsence\')','delete from cw_user_2_menu where user_id = 1 and menu_id in (select id from cw_menu where name = \'viewPresenceAbsence\')',0,'OK','',''),
(343,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',369,'2018-02-07 00:35:57','\0','change menu viewPresenceAbsence to viewPresenceAbsenceOverview - part 4','','2018-02-07 00:36:05','2018-02-07 00:36:05','','delete from cw_menu where name = \'viewPresenceAbsence\'','delete from cw_menu where name = \'viewPresenceAbsence\'',0,'OK','',''),
(344,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_operator_type_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',370,'2018-02-07 00:35:57','\0','change menu ViewInformation to viewInformation - part 1','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_operator_type_2_menu set menu_id = (select id from cw_menu where name = \'viewInformation\') where menu_id in (select id from cw_menu where name = \'ViewInformation\')','update cw_operator_type_2_menu set menu_id = (select id from cw_menu where name = \'viewInformation\') where menu_id in (select id from cw_menu where name = \'ViewInformation\')',0,'OK','',''),
(345,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',371,'2018-02-07 00:35:57','\0','change menu ViewInformation to viewInformation - part 2','','2018-02-07 00:36:05','2018-02-07 00:36:05','','update cw_user_2_menu set menu_id = (select id from cw_menu where name = \'viewInformation\') where user_id != 1 and menu_id in (select id from cw_menu where name = \'ViewInformation\')','update cw_user_2_menu set menu_id = (select id from cw_menu where name = \'viewInformation\') where user_id != 1 and menu_id in (select id from cw_menu where name = \'ViewInformation\')',0,'OK','',''),
(346,1,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_user_2_menu\') &&\n			at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',372,'2018-02-07 00:35:57','\0','change menu ViewInformation to viewInformation - part 3','','2018-02-07 00:36:06','2018-02-07 00:36:06','','delete from cw_user_2_menu where user_id = 1 and menu_id in (select id from cw_menu where name = \'ViewInformation\')','delete from cw_user_2_menu where user_id = 1 and menu_id in (select id from cw_menu where name = \'ViewInformation\')',0,'OK','',''),
(347,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\') &&\n			at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type\')','',375,'2018-02-07 00:35:57','\0','init cw_trigger.trigger_type_enum = trigger_type','','2018-02-07 00:36:06','2018-02-07 00:36:06','','update cw_trigger set trigger_type_enum = trigger_type','update cw_trigger set trigger_type_enum = trigger_type',0,'condition is false','',''),
(348,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\') &&\n			at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type\')','',376,'2018-02-07 00:35:57','\0','drop cw_trigger.trigger_type','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_trigger drop column trigger_type','alter table cw_trigger drop column trigger_type',0,'condition is false','',''),
(349,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_time_time_types\')','',381,'2018-02-07 00:35:57','\0','init cw_general_validation.all_time_time_types = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_time_time_types = 0 where all_time_time_types is null','update cw_general_validation set all_time_time_types = 0 where all_time_time_types is null',0,'OK','',''),
(350,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_time_time_models\')','',382,'2018-02-07 00:35:57','\0','init cw_general_validation.all_time_time_models = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_time_time_models = 0 where all_time_time_models is null','update cw_general_validation set all_time_time_models = 0 where all_time_time_models is null',0,'OK','',''),
(351,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_time_time_plans\')','',383,'2018-02-07 00:35:57','\0','init cw_general_validation.all_time_time_plans = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_time_time_plans = 0 where all_time_time_plans is null','update cw_general_validation set all_time_time_plans = 0 where all_time_time_plans is null',0,'OK','',''),
(352,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_time_time_companies\')','',384,'2018-02-07 00:35:57','\0','init cw_general_validation.all_time_time_companies = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_time_time_companies = 0 where all_time_time_companies is null','update cw_general_validation set all_time_time_companies = 0 where all_time_time_companies is null',0,'condition is false','',''),
(353,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_employee_function\', \'function\')','',385,'2018-02-07 00:35:57','\0','drop cw_employee_function.function','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_employee_function drop column function','alter table cw_employee_function drop column function',0,'condition is false','',''),
(354,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'parallel_circuit\')','',386,'2018-02-07 00:35:57','\0','init cw_terminal_key_flex.parallel_circuit = \'STATIC_OFF\'','','2018-02-07 00:36:06','2018-02-07 00:36:06','','update cw_terminal_key_flex set parallel_circuit = \'STATIC_OFF\' where parallel_circuit is null or parallel_circuit = \'\'','update cw_terminal_key_flex set parallel_circuit = \'STATIC_OFF\' where parallel_circuit is null or parallel_circuit = \'\'',0,'OK','',''),
(355,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_companies\')','',387,'2018-02-07 00:35:57','\0','init cw_general_validation.all_companies = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_companies = 0 where all_companies is null','update cw_general_validation set all_companies = 0 where all_companies is null',0,'OK','',''),
(356,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_time_time_models\')','',388,'2018-02-07 00:35:57','\0','init cw_general_validation.all_time_time_models = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_time_time_models = 0 where all_time_time_models is null','update cw_general_validation set all_time_time_models = 0 where all_time_time_models is null',0,'OK','',''),
(357,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_time_time_plans\')','',389,'2018-02-07 00:35:57','\0','init cw_general_validation.all_time_time_plans = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_time_time_plans = 0 where all_time_time_plans is null','update cw_general_validation set all_time_time_plans = 0 where all_time_time_plans is null',0,'OK','',''),
(358,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_time_time_types\')','',390,'2018-02-07 00:35:57','\0','init cw_general_validation.all_time_time_types = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_time_time_types = 0 where all_time_time_types is null','update cw_general_validation set all_time_time_types = 0 where all_time_time_types is null',0,'OK','',''),
(359,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_device\', \'individual_cycle_custom_coding\')','',391,'2018-02-07 00:35:57','\0','init cw_device.individual_cycle_custom_coding = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_device set individual_cycle_custom_coding = 0 where individual_cycle_custom_coding is null','update cw_device set individual_cycle_custom_coding = 0 where individual_cycle_custom_coding is null',0,'OK','',''),
(360,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_users\')','',392,'2018-02-07 00:35:57','\0','init cw_general_validation.all_users = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_general_validation set all_users = 0 where all_users is null','update cw_general_validation set all_users = 0 where all_users is null',0,'OK','',''),
(361,1,'at.clockwork.system.service.DataSourceService.getRecordCountOfDatabaseTable(connection, \'cw_user_category\')==0','',393,'2018-02-07 00:35:57','\0','insert into cw_user_category','','2018-02-07 00:36:06','2018-02-07 00:36:06','','','',0,'OK','','import at.clockwork.security.domain.*\n			\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		boolean error = true\n\n		new UserCategory(description:\"Standard\").save()\n\n		def resultMap = at.clockwork.system.service.DataSourceService.execute(\n			connection,\n			dataSourceFields,\n			[\n				mySQLStatement:\"update cw_user set user_category_id = 1 where user_category_id is null or user_category_id = 0\",\n				msSQLStatement:\"update cw_user set user_category_id = 1 where user_category_id is null or user_category_id = 0\"\n			]\n		)\n			\n		error\n	}\n}'),
(362,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_user\', \'date_created\')','',394,'2018-02-07 00:35:57','\0','init cw_user.date_created = curdate()','','2018-02-07 00:36:06','2018-02-07 00:36:06','','update cw_user set date_created = getdate()','update cw_user set date_created = curdate()',0,'OK','',''),
(363,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_user\', \'last_updated\')','',395,'2018-02-07 00:35:57','\0','init cw_user.last_updated = curdate()','','2018-02-07 00:36:06','2018-02-07 00:36:06','','update cw_user set last_updated = getdate()','update cw_user set last_updated = curdate()',0,'OK','',''),
(364,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_type\', \'routable_value\')','',396,'2018-02-07 00:35:57','\0','init cw_operator_type.routable_value = false','','2018-02-07 00:36:06','2022-11-04 07:48:15','','update cw_operator_type set routable_value = 0 where routable_value is null','update cw_operator_type set routable_value = 0 where routable_value is null',0,'OK','',''),
(365,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_type\', \'routable\')','',397,'2018-02-07 00:35:57','\0','drop cw_operator_type.routable','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_operator_type drop column routable','alter table cw_operator_type drop column routable',0,'condition is false','',''),
(366,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_planning_model\', \'available_for_all_person_categories\')','',398,'2018-02-07 00:35:57','\0','drop cw_planning_model.available_for_all_person_categories','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_planning_model drop column available_for_all_person_categories','alter table cw_planning_model drop column available_for_all_person_categories',0,'condition is false','',''),
(367,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_planning_plan\', \'available_for_all_person_categories\')','',399,'2018-02-07 00:35:57','\0','drop cw_planning_plan.available_for_all_person_categories','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_planning_plan drop column available_for_all_person_categories','alter table cw_planning_plan drop column available_for_all_person_categories',0,'condition is false','',''),
(368,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_model\', \'available_for_all_person_categories\')','',400,'2018-02-07 00:35:57','\0','drop cw_time_time_model.available_for_all_person_categories','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_time_time_model drop column available_for_all_person_categories','alter table cw_time_time_model drop column available_for_all_person_categories',0,'condition is false','',''),
(369,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'available_for_all_person_categories\')','',401,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.available_for_all_person_categories','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_time_time_plan drop column available_for_all_person_categories','alter table cw_time_time_plan drop column available_for_all_person_categories',0,'condition is false','',''),
(370,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'date_of_balance\')','',402,'2018-02-07 00:35:57','\0','drop cw_person.date_of_balance','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column date_of_balance','alter table cw_person drop column date_of_balance',0,'condition is false','',''),
(371,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance1\')','',403,'2018-02-07 00:35:57','\0','drop cw_person.balance1','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance1','alter table cw_person drop column balance1',0,'condition is false','',''),
(372,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance2\')','',404,'2018-02-07 00:35:57','\0','drop cw_person.balance2','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance2','alter table cw_person drop column balance2',0,'condition is false','',''),
(373,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance3\')','',405,'2018-02-07 00:35:57','\0','drop cw_person.balance3','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance3','alter table cw_person drop column balance3',0,'condition is false','',''),
(374,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance4\')','',406,'2018-02-07 00:35:57','\0','drop cw_person.balance4','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance4','alter table cw_person drop column balance4',0,'condition is false','',''),
(375,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance5\')','',407,'2018-02-07 00:35:57','\0','drop cw_person.balance5','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance5','alter table cw_person drop column balance5',0,'condition is false','',''),
(376,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance6\')','',408,'2018-02-07 00:35:57','\0','drop cw_person.balance6','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance6','alter table cw_person drop column balance6',0,'condition is false','',''),
(377,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance7\')','',409,'2018-02-07 00:35:57','\0','drop cw_person.balance7','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance7','alter table cw_person drop column balance7',0,'condition is false','',''),
(378,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance8\')','',410,'2018-02-07 00:35:57','\0','drop cw_person.balance8','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance8','alter table cw_person drop column balance8',0,'condition is false','',''),
(379,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance9\')','',411,'2018-02-07 00:35:57','\0','drop cw_person.balance9','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance9','alter table cw_person drop column balance9',0,'condition is false','',''),
(380,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'balance10\')','',412,'2018-02-07 00:35:57','\0','drop cw_person.balance10','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_person drop column balance10','alter table cw_person drop column balance10',0,'condition is false','',''),
(381,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_gps_booking\', \'deleted\')','',413,'2018-02-07 00:35:57','\0','drop cw_gps_booking.deleted','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_gps_booking drop column deleted','alter table cw_gps_booking drop column deleted',0,'condition is false','',''),
(382,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_keyflex_person_day_access_schedule\', \'available_for_all_person_categories\')','',421,'2018-02-07 00:35:57','\0','drop cw_keyflex_person_day_access_schedule.available_for_all_person_categories','','2018-02-07 00:36:06','2018-02-07 00:36:06','','alter table cw_keyflex_person_day_access_schedule drop column available_for_all_person_categories','alter table cw_keyflex_person_day_access_schedule drop column available_for_all_person_categories',0,'condition is false','',''),
(383,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_keyflex_person_access_schedule\', \'available_for_all_person_categories\')','',422,'2018-02-07 00:35:57','\0','drop cw_keyflex_person_access_schedule.available_for_all_person_categories','','2018-02-07 00:36:06','2018-02-07 00:36:07','','alter table cw_keyflex_person_access_schedule drop column available_for_all_person_categories','alter table cw_keyflex_person_access_schedule drop column available_for_all_person_categories',0,'condition is false','',''),
(384,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_day_access_schedule\', \'available_for_all_person_categories\')','',423,'2018-02-07 00:35:57','\0','drop cw_person_day_access_schedule.available_for_all_person_categories','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_person_day_access_schedule drop column available_for_all_person_categories','alter table cw_person_day_access_schedule drop column available_for_all_person_categories',0,'condition is false','',''),
(385,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_access_schedule\', \'available_for_all_person_categories\')','',424,'2018-02-07 00:35:57','\0','drop cw_person_access_schedule.available_for_all_person_categories','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_person_access_schedule drop column available_for_all_person_categories','alter table cw_person_access_schedule drop column available_for_all_person_categories',0,'condition is false','',''),
(386,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type_data_initial\', \'comment\')','',425,'2018-02-07 00:35:57','\0','set cw_time_time_type_data_initial.comment nullable','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_time_time_type_data_initial alter column comment varchar(255) null','alter table cw_time_time_type_data_initial modify comment varchar(255) null',0,'OK','',''),
(387,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_2_time_time_plan\', \'employment_contract_enum\')','',426,'2018-02-07 00:35:57','\0','init cw_person_2_time_time_plan.employment_contract_enum','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_person_2_time_time_plan set employment_contract_enum = \'PRESENT\' where employment_contract_enum is null or employment_contract_enum = \'\'','update cw_person_2_time_time_plan set employment_contract_enum = \'PRESENT\' where employment_contract_enum is null or employment_contract_enum = \'\'',0,'OK','',''),
(388,0,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_2_time_time_plan\', \'time_time_plan_id\')','',427,'2018-02-07 00:35:57','\0','set cw_person_2_time_time_plan.time_time_plan_id nullable','',NULL,'2018-02-07 00:35:57','','alter table cw_person_2_time_time_plan alter column time_time_plan_id bigint null','alter table cw_person_2_time_time_plan modify time_time_plan_id bigint null',0,NULL,'',''),
(389,1,'','',428,'2018-02-07 00:35:57','\0','clean systemConfiguration','','2018-02-07 00:36:07','2018-02-07 00:36:07','','','',0,'OK','','import at.clockwork.system.service.SystemConfigurationService\nimport grails.util.Holders\n\nclass UpdateScriptService {\n\n	def systemConfigurationService = Holders.grailsApplication.mainContext.getBean \'systemConfigurationService\'\n\n	def run(def connection, def dataSourceFields) {\n\n		systemConfigurationService.deleteByCwID(154)\n		systemConfigurationService.deleteByCwID(155)\n		systemConfigurationService.deleteByCwID(801)\n		systemConfigurationService.deleteByCwID(811)\n		systemConfigurationService.deleteByCwID(812)\n		systemConfigurationService.deleteByCwID(813)\n		systemConfigurationService.deleteByCwID(814)\n		systemConfigurationService.deleteByCwID(815)\n		systemConfigurationService.deleteByCwID(816)\n		systemConfigurationService.deleteByCwID(1031)\n		systemConfigurationService.deleteByCwID(1051)\n		systemConfigurationService.deleteByCwID(1052)\n		systemConfigurationService.deleteByCwID(10501)\n		systemConfigurationService.deleteByCwID(10502)\n		systemConfigurationService.deleteByCwID(10511)\n		systemConfigurationService.deleteByCwID(10512)\n		systemConfigurationService.deleteByCwID(99001)\n\n		true\n	}\n}'),
(390,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'show_in_validation_start_day_value\')','',429,'2018-02-07 00:35:57','\0','init cw_time_time_type.show_in_validation_start_day_value = 0','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_time_time_type set show_in_validation_start_day_value = 0 where show_in_validation_start_day_value is null','update cw_time_time_type set show_in_validation_start_day_value = 0 where show_in_validation_start_day_value is null',0,'OK','',''),
(391,0,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'show_in_validation_end_day_value\')','',430,'2018-02-07 00:35:57','\0','init cw_time_time_type.show_in_validation_end_day_value = 0','',NULL,'2018-02-07 00:35:57','','update cw_time_time_type set show_in_validation_end_day_value = 0 where show_in_validation_end_day_value is null','update cw_time_time_type set show_in_validation_end_day_value = 0 where show_in_validation_end_day_value is null',0,NULL,'',''),
(392,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item\', \'order_category_id\')','',431,'2018-02-07 00:35:57','\0','drop cw_order_item.order_category_id','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_order_item drop column order_category_id','alter table cw_order_item drop column order_category_id',0,'condition is false','',''),
(393,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',432,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum READING_DATA TO READ_DATA','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'READ_DATA\' where trigger_type_enum = \'READING_DATA\'','update cw_trigger set trigger_type_enum = \'READ_DATA\' where trigger_type_enum = \'READING_DATA\'',0,'OK','',''),
(394,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',433,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum ACTION TO EXECUTE_ACTION','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'EXECUTE_ACTION\' where trigger_type_enum = \'ACTION\'','update cw_trigger set trigger_type_enum = \'EXECUTE_ACTION\' where trigger_type_enum = \'ACTION\'',0,'OK','',''),
(395,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',434,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum SCRIPT TO EXECUTE_SCRIPT','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'EXECUTE_SCRIPT\' where trigger_type_enum = \'SCRIPT\'','update cw_trigger set trigger_type_enum = \'EXECUTE_SCRIPT\' where trigger_type_enum = \'SCRIPT\'',0,'OK','',''),
(396,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',435,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum EMAIL TO SEND_EMAIL','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'SEND_EMAIL\' where trigger_type_enum = \'EMAIL\'','update cw_trigger set trigger_type_enum = \'SEND_EMAIL\' where trigger_type_enum = \'EMAIL\'',0,'OK','',''),
(397,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',436,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum INFORMATION_TERMINALCOMMUNICATION TO INFORM_ABOUT_TERMINALCOMMUNICATION','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'INFORM_ABOUT_TERMINALCOMMUNICATION\' where trigger_type_enum = \'INFORMATION_TERMINALCOMMUNICATION\'','update cw_trigger set trigger_type_enum = \'INFORM_ABOUT_TERMINALCOMMUNICATION\' where trigger_type_enum = \'INFORMATION_TERMINALCOMMUNICATION\'',0,'OK','',''),
(398,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',437,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum TERMINAL_SET_DATE_TIME TO SET_DATE_TIME_IN_TERMINALS','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'SET_DATE_TIME_IN_TERMINALS\' where trigger_type_enum = \'TERMINAL_SET_DATE_TIME\'','update cw_trigger set trigger_type_enum = \'SET_DATE_TIME_IN_TERMINALS\' where trigger_type_enum = \'TERMINAL_SET_DATE_TIME\'',0,'OK','',''),
(399,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',438,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum GEOCODING TO SET_GEOCODING_DATA','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'SET_GEOCODING_DATA\' where trigger_type_enum = \'GEOCODING\'','update cw_trigger set trigger_type_enum = \'SET_GEOCODING_DATA\' where trigger_type_enum = \'GEOCODING\'',0,'OK','',''),
(400,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',439,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum WRITING_BALANCE TO WRITE_BALANCES','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'WRITE_BALANCES\' where trigger_type_enum = \'WRITING_BALANCE\'','update cw_trigger set trigger_type_enum = \'WRITE_BALANCES\' where trigger_type_enum = \'WRITING_BALANCE\'',0,'OK','',''),
(401,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',440,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum CALCULATION TO CALCULATE_TIME_ATTENDANCE','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'CALCULATE_TIME_ATTENDANCE\' where trigger_type_enum = \'CALCULATION\'','update cw_trigger set trigger_type_enum = \'CALCULATE_TIME_ATTENDANCE\' where trigger_type_enum = \'CALCULATION\'',0,'OK','',''),
(402,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',441,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum UPDATING_TERMINAL TO UPDATE_TERMINALS','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'UPDATE_TERMINALS\' where trigger_type_enum = \'UPDATING_TERMINAL\'','update cw_trigger set trigger_type_enum = \'UPDATE_TERMINALS\' where trigger_type_enum = \'UPDATING_TERMINAL\'',0,'OK','',''),
(403,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_trigger\', \'trigger_type_enum\')','',442,'2018-02-07 00:35:57','\0','change Trigger.triggerTypeEnum INITIALIZING_ID_DATA TO INITIALIZE_ID_DATA','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_trigger set trigger_type_enum = \'INITIALIZE_ID_DATA\' where trigger_type_enum = \'INITIALIZING_ID_DATA\'','update cw_trigger set trigger_type_enum = \'INITIALIZE_ID_DATA\' where trigger_type_enum = \'INITIALIZING_ID_DATA\'',0,'OK','',''),
(404,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person_2_identification\', \'deleted\')','',443,'2018-02-07 00:35:57','\0','init cw_person_2_identification.deleted = false','','2018-02-07 00:36:07','2022-11-04 07:48:16','','update cw_person_2_identification set deleted = 0 where deleted is null','update cw_person_2_identification set deleted = 0 where deleted is null',0,'OK','',''),
(405,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'valid_from\')','',444,'2018-02-07 00:35:57','\0','drop cw_terminal.valid_from','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_terminal drop column valid_from','alter table cw_terminal drop column valid_from',0,'condition is false','',''),
(406,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'valid_to\')','',445,'2018-02-07 00:35:57','\0','drop cw_terminal.valid_to','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_terminal drop column valid_to','alter table cw_terminal drop column valid_to',0,'condition is false','',''),
(407,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'do_synchronize_date\')','',446,'2018-02-07 00:35:57','\0','drop cw_terminal.do_synchronize_date','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_terminal drop column do_synchronize_date','alter table cw_terminal drop column do_synchronize_date',0,'condition is false','',''),
(408,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_information_type\', \'send_message_to_terminal\')','',447,'2018-02-07 00:35:57','\0','update cw_information_type set send_message_to_terminal = false','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_information_type set send_message_to_terminal = 0','update cw_information_type set send_message_to_terminal = false',0,'OK','',''),
(409,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event_base_data\', \'code\')','',448,'2018-02-07 00:35:57','\0','int cw_event_base_data.code','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_event_base_data set code = \'\' where code is null','update cw_event_base_data set code = \'\' where code is null',0,'OK','',''),
(410,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event_base_data\', \'pin_code\')','',449,'2018-02-07 00:35:57','\0','int cw_event_base_data.pin_code','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_event_base_data set pin_code = \'\' where pin_code is null','update cw_event_base_data set pin_code = \'\' where pin_code is null',0,'OK','',''),
(411,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event_base_data\', \'type\')','',450,'2018-02-07 00:35:57','\0','int cw_event_base_data.type','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_event_base_data set type = \'\' where type is null','update cw_event_base_data set type = \'\' where type is null',0,'OK','',''),
(412,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event_base_data\', \'entry\')','',451,'2018-02-07 00:35:57','\0','int cw_event_base_data.entry','','2018-02-07 00:36:07','2022-11-04 07:48:16','','update cw_event_base_data set entry = 0 where entry is null','update cw_event_base_data set entry = 0 where entry is null',0,'OK','',''),
(413,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event\', \'datum\')','',452,'2018-02-07 00:35:57','\0','drop cw_event.datum','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_event drop column datum','alter table cw_event drop column datum',0,'condition is false','',''),
(414,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event\', \'tip\')','',453,'2018-02-07 00:35:57','\0','drop cw_event.tip','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_event drop column tip','alter table cw_event drop column tip',0,'condition is false','',''),
(415,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event\', \'event_type\')','',454,'2018-02-07 00:35:57','\0','drop cw_event.event_type','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_event drop column event_type','alter table cw_event drop column event_type',0,'condition is false','',''),
(416,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event\', \'code\')','',455,'2018-02-07 00:35:57','\0','drop cw_event.code','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_event drop column code','alter table cw_event drop column code',0,'condition is false','',''),
(417,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event\', \'zusatzdaten\')','',456,'2018-02-07 00:35:57','\0','drop cw_event.zusatzdaten','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_event drop column zusatzdaten','alter table cw_event drop column zusatzdaten',0,'condition is false','',''),
(418,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event\', \'buchungscode\')','',457,'2018-02-07 00:35:57','\0','drop cw_event.buchungscode','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_event drop column buchungscode','alter table cw_event drop column buchungscode',0,'condition is false','',''),
(419,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_event\', \'identification_data\')','',458,'2018-02-07 00:35:57','\0','drop cw_event.identification_data','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_event drop column identification_data','alter table cw_event drop column identification_data',0,'condition is false','',''),
(420,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_role\', \'select_work_time_type\')','',459,'2018-02-07 00:35:57','\0','init cw_operator_role.select_work_time_type = false','','2018-02-07 00:36:07','2022-11-04 07:48:16','','update cw_operator_role set select_work_time_type = 0 where select_work_time_type is null','update cw_operator_role set select_work_time_type = 0 where select_work_time_type is null',0,'OK','',''),
(421,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_role\', \'select_terminal\')','',460,'2018-02-07 00:35:57','\0','init cw_operator_role.select_terminal = false','','2018-02-07 00:36:07','2022-11-04 07:48:16','','update cw_operator_role set select_terminal = 0 where select_terminal is null','update cw_operator_role set select_terminal = 0 where select_terminal is null',0,'OK','',''),
(422,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_role\', \'select_event_type\')','',461,'2018-02-07 00:35:57','\0','init cw_operator_role.select_event_type = false','','2018-02-07 00:36:07','2022-11-04 07:48:16','','update cw_operator_role set select_event_type = 0 where select_event_type is null','update cw_operator_role set select_event_type = 0 where select_event_type is null',0,'OK','',''),
(423,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_work_time_type_data\', \'tza\')','',462,'2018-02-07 00:35:57','\0','drop cw_work_time_type_data.tza','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_work_time_type_data drop column tza','alter table cw_work_time_type_data drop column tza',0,'condition is false','',''),
(424,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_chiplox_2_antenna\', \'identification_type_id\')','',463,'2018-02-07 00:35:57','\0','init cw_terminal_chiplox_2_antenna.identification_type_id = 1 where identification_type_id = 0','','2018-02-07 00:36:07','2018-02-07 00:36:07','','update cw_terminal_chiplox_2_antenna set identification_type_id = 1 where identification_type_id = 0','update cw_terminal_chiplox_2_antenna set identification_type_id = 1 where identification_type_id = 0',0,'OK','',''),
(425,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_report_role\', \'personal_script\')','',464,'2018-02-07 00:35:57','\0','drop cw_report_role.personal_script','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_report_role drop column personal_script','alter table cw_report_role drop column personal_script',0,'condition is false','',''),
(426,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_report_role\', \'personal_script_code\')','',465,'2018-02-07 00:35:57','\0','drop cw_report_role.personal_script_code','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_report_role drop column personal_script_code','alter table cw_report_role drop column personal_script_code',0,'condition is false','',''),
(427,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'additional_number1\')','',466,'2018-02-07 00:35:57','\0','drop cw_order.additional_number1','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_order drop column additional_number1','alter table cw_order drop column additional_number1',0,'condition is false','',''),
(428,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'additional_number2\')','',467,'2018-02-07 00:35:57','\0','drop cw_order.additional_number2','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_order drop column additional_number2','alter table cw_order drop column additional_number2',0,'condition is false','',''),
(429,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'additional_number3\')','',468,'2018-02-07 00:35:57','\0','drop cw_order.additional_number3','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_order drop column additional_number3','alter table cw_order drop column additional_number3',0,'condition is false','',''),
(430,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'additional_number4\')','',469,'2018-02-07 00:35:57','\0','drop cw_order.additional_number4','','2018-02-07 00:36:07','2018-02-07 00:36:07','','alter table cw_order drop column additional_number4','alter table cw_order drop column additional_number4',0,'condition is false','',''),
(431,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'additional_number5\')','',470,'2018-02-07 00:35:57','\0','drop cw_order.additional_number5','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_order drop column additional_number5','alter table cw_order drop column additional_number5',0,'condition is false','',''),
(432,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'duration\')','',471,'2018-02-07 00:35:57','\0','init cw_order.duration','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_order set duration = 0 where duration is null','update cw_order set duration = 0 where duration is null',0,'OK','',''),
(433,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order\', \'quantity\')','',472,'2018-02-07 00:35:57','\0','init cw_order.quantity','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_order set quantity = 0 where quantity is null','update cw_order set quantity = 0 where quantity is null',0,'OK','',''),
(434,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item\', \'duration\')','',473,'2018-02-07 00:35:57','\0','init cw_order_item.duration','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_order_item set duration = 0 where duration is null','update cw_order_item set duration = 0 where duration is null',0,'OK','',''),
(435,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_order_item\', \'quantity\')','',474,'2018-02-07 00:35:57','\0','init cw_order_item.quantity','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_order_item set quantity = 0 where quantity is null','update cw_order_item set quantity = 0 where quantity is null',0,'OK','',''),
(436,106,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_operator_role\', \'alternative_filename\')','',475,'2018-02-07 00:35:57','\0','update cw_operator_role.alternative_file where alternative_filename = \'null\'','','2018-02-07 00:36:08','2025-03-24 00:42:01','','update cw_operator_role set alternative_filename = \'\' where alternative_filename = \'null\'','update cw_operator_role set alternative_filename = \'\' where alternative_filename = \'null\'',0,'OK','',''),
(437,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_email\', \'user_id\')','',477,'2018-02-07 00:35:57','\0','allow null at cw_email.user_id','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_email alter column user_id numeric(19,0) null','alter table cw_email modify user_id bigint null',0,'OK','',''),
(438,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'all_workflow_types\')','',478,'2018-02-07 00:35:57','\0','init cw_general_validation.all_workflow_types = false','','2018-02-07 00:36:08','2022-11-04 07:48:16','','update cw_general_validation set all_workflow_types = 0 where all_workflow_types is null','update cw_general_validation set all_workflow_types = 0 where all_workflow_types is null',0,'OK','',''),
(439,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_calculation_day_info\', \'calculated_too_soon\')','',479,'2018-02-07 00:35:57','\0','init cw_calculation_day_info.calculated_too_soon = 0','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_calculation_day_info set calculated_too_soon = 0 where calculated_too_soon is null','update cw_calculation_day_info set calculated_too_soon = 0 where calculated_too_soon is null',0,'OK','',''),
(440,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_calculation_day_info\', \'calculated_too_late\')','',480,'2018-02-07 00:35:57','\0','init cw_calculation_day_info.calculated_too_late = 0','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_calculation_day_info set calculated_too_late = 0 where calculated_too_late is null','update cw_calculation_day_info set calculated_too_late = 0 where calculated_too_late is null',0,'OK','',''),
(441,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workflow_type_2_action\', \'value1\')','',481,'2018-02-07 00:35:57','\0','drop cw_workflow_type_2_action.value1','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_workflow_type_2_action drop column value1','alter table cw_workflow_type_2_action drop column value1',0,'condition is false','',''),
(442,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workflow_type_2_action\', \'value2\')','',482,'2018-02-07 00:35:57','\0','drop cw_workflow_type_2_action.value2','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_workflow_type_2_action drop column value2','alter table cw_workflow_type_2_action drop column value2',0,'condition is false','',''),
(443,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workflow\', \'value1\')','',483,'2018-02-07 00:35:57','\0','drop cw_workflow.value1','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_workflow drop column value1','alter table cw_workflow drop column value1',0,'condition is false','',''),
(444,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workflow\', \'value2\')','',484,'2018-02-07 00:35:57','\0','drop cw_workflow.value2','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_workflow drop column value2','alter table cw_workflow drop column value2',0,'condition is false','',''),
(445,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workflow\', \'text1\')','',485,'2018-02-07 00:35:57','\0','drop cw_workflow.text1','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_workflow drop column text1','alter table cw_workflow drop column text1',0,'condition is false','',''),
(446,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workflow\', \'text2\')','',486,'2018-02-07 00:35:57','\0','drop cw_workflow.text2','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_workflow drop column text2','alter table cw_workflow drop column text2',0,'condition is false','',''),
(447,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_workflow\', \'workflow_enum\')','',487,'2018-02-07 00:35:57','\0','drop cw_workflow.workflow_enum','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_workflow drop column workflow_enum','alter table cw_workflow drop column workflow_enum',0,'condition is false','',''),
(448,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'is_used_target_time_monday\')','',488,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.is_used_target_time_monday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column is_used_target_time_monday','alter table cw_time_time_plan drop column is_used_target_time_monday',0,'condition is false','',''),
(449,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'is_used_target_time_tuesday\')','',489,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.is_used_target_time_tuesday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column is_used_target_time_tuesday','alter table cw_time_time_plan drop column is_used_target_time_tuesday',0,'condition is false','',''),
(450,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'is_used_target_time_wednesday\')','',490,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.is_used_target_time_wednesday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column is_used_target_time_wednesday','alter table cw_time_time_plan drop column is_used_target_time_wednesday',0,'condition is false','',''),
(451,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'is_used_target_time_thursday\')','',491,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.is_used_target_time_thursday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column is_used_target_time_thursday','alter table cw_time_time_plan drop column is_used_target_time_thursday',0,'condition is false','',''),
(452,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'is_used_target_time_friday\')','',492,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.is_used_target_time_friday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column is_used_target_time_friday','alter table cw_time_time_plan drop column is_used_target_time_friday',0,'condition is false','',''),
(453,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'is_used_target_time_saturday\')','',493,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.is_used_target_time_saturday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column is_used_target_time_saturday','alter table cw_time_time_plan drop column is_used_target_time_saturday',0,'condition is false','',''),
(454,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'is_used_target_time_sunday\')','',494,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.is_used_target_time_sunday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column is_used_target_time_sunday','alter table cw_time_time_plan drop column is_used_target_time_sunday',0,'condition is false','',''),
(455,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'target_time_monday\')','',495,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.target_time_monday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column target_time_monday','alter table cw_time_time_plan drop column target_time_monday',0,'condition is false','',''),
(456,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'target_time_tuesday\')','',496,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.target_time_tuesday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column target_time_tuesday','alter table cw_time_time_plan drop column target_time_tuesday',0,'condition is false','',''),
(457,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'target_time_wednesday\')','',497,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.target_time_wednesday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column target_time_wednesday','alter table cw_time_time_plan drop column target_time_wednesday',0,'condition is false','',''),
(458,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'target_time_thursday\')','',498,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.target_time_thursday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column target_time_thursday','alter table cw_time_time_plan drop column target_time_thursday',0,'condition is false','',''),
(459,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'target_time_friday\')','',499,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.target_time_friday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column target_time_friday','alter table cw_time_time_plan drop column target_time_friday',0,'condition is false','',''),
(460,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'target_time_saturday\')','',500,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.target_time_saturday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column target_time_saturday','alter table cw_time_time_plan drop column target_time_saturday',0,'condition is false','',''),
(461,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_plan\', \'target_time_sunday\')','',501,'2018-02-07 00:35:57','\0','drop cw_time_time_plan.target_time_sunday','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_time_time_plan drop column target_time_sunday','alter table cw_time_time_plan drop column target_time_sunday',0,'condition is false','',''),
(462,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal\', \'number\')','',502,'2018-02-07 00:35:57','\0','init cw_terminal.number','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_terminal set number = \'\' where number is null','update cw_terminal set number = \'\' where number is null',0,'OK','',''),
(463,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'no_time_active\')','',503,'2018-02-07 00:35:57','\0','init cw_person.noTimeActive','','2018-02-07 00:36:08','2022-11-04 07:48:16','','update cw_person set no_time_active = 0 where no_time_active is null','update cw_person set no_time_active = 0 where no_time_active is null',0,'OK','',''),
(464,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'no_work_active\')','',504,'2018-02-07 00:35:57','\0','init cw_person.noWorkActive','','2018-02-07 00:36:08','2022-11-04 07:48:16','','update cw_person set no_work_active = 0 where no_work_active is null','update cw_person set no_work_active = 0 where no_work_active is null',0,'OK','',''),
(465,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'no_access_active\')','',505,'2018-02-07 00:35:57','\0','init cw_person.noAccessActive','','2018-02-07 00:36:08','2022-11-04 07:48:16','','update cw_person set no_access_active = 0 where no_access_active is null','update cw_person set no_access_active = 0 where no_access_active is null',0,'OK','',''),
(466,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'no_planning_active\')','',506,'2018-02-07 00:35:57','\0','init cw_person.noPlanningActive','','2018-02-07 00:36:08','2022-11-04 07:48:16','','update cw_person set no_planning_active = 0 where no_planning_active is null','update cw_person set no_planning_active = 0 where no_planning_active is null',0,'OK','',''),
(467,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'no_visitor_active\')','',507,'2018-02-07 00:35:57','\0','init cw_person.noVisitorActive','','2018-02-07 00:36:08','2022-11-04 07:48:16','','update cw_person set no_visitor_active = 0 where no_visitor_active is null','update cw_person set no_visitor_active = 0 where no_visitor_active is null',0,'OK','',''),
(468,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_person\', \'no_ticket_system_active\')','',508,'2018-02-07 00:35:57','\0','init cw_person.noTicketSystemActive','','2018-02-07 00:36:08','2022-11-04 07:48:16','','update cw_person set no_ticket_system_active = 0 where no_ticket_system_active is null','update cw_person set no_ticket_system_active = 0 where no_ticket_system_active is null',0,'OK','',''),
(469,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_simulation_2_menu\', \'width\')','',509,'2018-02-07 00:35:57','\0','drop cw_terminal_simulation_2_menu.width','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_terminal_simulation_2_menu drop column width','alter table cw_terminal_simulation_2_menu drop column width',0,'condition is false','',''),
(470,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_simulation_2_menu\', \'height\')','',510,'2018-02-07 00:35:57','\0','drop cw_terminal_simulation_2_menu.height','','2018-02-07 00:36:08','2018-02-07 00:36:08','','alter table cw_terminal_simulation_2_menu drop column height','alter table cw_terminal_simulation_2_menu drop column height',0,'condition is false','',''),
(471,1,'','',511,'2018-02-07 00:35:57','\0','clean systemConfiguration','','2018-02-07 00:36:08','2018-02-07 00:36:08','','','',0,'OK','','import at.clockwork.system.service.SystemConfigurationService\nimport grails.util.Holders\n\nclass UpdateScriptService {\n\n	def systemConfigurationService = Holders.grailsApplication.mainContext.getBean \'systemConfigurationService\'\n\n	def run(def connection, def dataSourceFields) {\n\n		systemConfigurationService.deleteByCwID(65)\n\n		true\n	}\n}'),
(472,1,'','',512,'2018-02-07 00:35:57','\0','identifications: trimLeadingZeros','','2018-02-07 00:36:08','2018-02-07 00:36:08','','','',0,'OK','','import at.clockwork.utility.ToolsService\nimport at.clockwork.common.domain.IdentificationCode\nimport grails.util.Holders\n\nclass UpdateScriptService {\n\n	def identificationCodeWriteService = Holders.grailsApplication.mainContext.getBean \'identificationCodeWriteService\'\n\n	def run(def connection, def dataSourceFields) {\n\n		IdentificationCode.findAll().each{ identificationCode ->\n		    identificationCode.code = ToolsService.trimLeadingString(identificationCode?.code ?: \"\", \"0\")\n		    identificationCodeWriteService.save(identificationCode)\n		}\n\n		true\n	}\n}'),
(473,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_booking\', \'quantity\')','',513,'2018-02-07 00:35:57','\0','init cw_booking.quantity','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_booking set quantity = 0 where quantity is null','update cw_booking set quantity = 0 where quantity is null',0,'OK','',''),
(474,2,'','',514,'2018-02-07 00:35:57','\0','\"delete from cw_menu where menuName = \'menuAuthorisation\'','','2018-02-07 00:36:08','2018-05-22 11:22:39','','update cw_menu set deleted = 1 where name = \'menuAuthorisation\'','update cw_menu set deleted = true where name = \'menuAuthorisation\'',0,'OK','',''),
(475,2,'','',515,'2018-02-07 00:35:57','\0','delete from cw_menu where menuName = \'menu\'','','2018-02-07 00:36:08','2018-05-22 11:22:39','','update cw_menu set deleted = 1 where name=\'menu\'','update cw_menu set deleted = true where name=\'menu\'',0,'OK','',''),
(476,2,'','',516,'2018-02-07 00:35:57','\0','delete from cw_menu where menuName = \'personTimeOverview\'','','2018-02-07 00:36:08','2018-05-22 11:22:39','','update cw_menu set deleted = 1 where name = \'personTimeOverview\'','update cw_menu set deleted = true where name = \'personTimeOverview\'',0,'OK','',''),
(477,2,'','',517,'2018-02-07 00:35:57','\0','delete from cw_menu where menuName = \'viewPresenceAbsence\'','','2018-02-07 00:36:08','2018-05-22 11:22:39','','update cw_menu set deleted = 1 where name = \'viewPresenceAbsence\'','update cw_menu set deleted = true where name = \'viewPresenceAbsence\'',0,'OK','',''),
(478,1,'','',518,'2018-02-07 00:35:57','\0','update cw_time_plan_2_detail set position = 0','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_time_plan_2_detail set position = 0 where position is null','update cw_time_plan_2_detail set position = 0 where position is null',0,'OK','',''),
(479,1,'','',519,'2018-02-07 00:35:57','\0','update cw_calculation_day_info set shift_rotation_plan_position = 0','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_calculation_day_info set shift_rotation_plan_position = 0 where shift_rotation_plan_position is null','update cw_calculation_day_info set shift_rotation_plan_position = 0 where shift_rotation_plan_position is null',0,'OK','',''),
(480,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'close_enum\')','',520,'2018-02-07 00:35:57','\0','change TimeTimeType.closeEnum INDIVIDUAL TO INDIVIDUAL_DAY_AND_MONTH_OF_YEAR','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_time_time_type set close_enum = \'INDIVIDUAL_DAY_AND_MONTH_OF_YEAR\' where close_enum = \'INDIVIDUAL\'','update cw_time_time_type set close_enum = \'INDIVIDUAL_DAY_AND_MONTH_OF_YEAR\' where close_enum = \'INDIVIDUAL\'',0,'OK','',''),
(481,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'individual_close_day\')','',521,'2018-02-07 00:35:58','\0','init cw_time_time_type.individual_close_day','','2018-02-07 00:36:08','2018-02-07 00:36:08','','update cw_time_time_type set individual_close_day = 0 where individual_close_day is null','update cw_time_time_type set individual_close_day = 0 where individual_close_day is null',0,'OK','',''),
(482,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_time_time_type\', \'individual_close_month\')','',522,'2018-02-07 00:35:58','\0','init cw_time_time_type.individual_close_month','','2018-02-07 00:36:09','2018-02-07 00:36:09','','update cw_time_time_type set individual_close_month = 0 where individual_close_month is null','update cw_time_time_type set individual_close_month = 0 where individual_close_month is null',0,'OK','',''),
(483,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'fill_up\')','',523,'2018-02-07 00:35:58','\0','init cw_absence.fillUp','','2018-02-07 00:36:09','2018-02-07 00:36:09','','update cw_absence set fill_up = 0 where fill_up is null','update cw_absence set fill_up = 0 where fill_up is null',0,'OK','',''),
(484,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'average_days\')','',524,'2018-02-07 00:35:58','\0','init absence.averageDays','','2018-02-07 00:36:09','2018-05-22 11:22:39','','update cw_absence set average_days = 0 where average_days is null','update cw_absence set average_days = 0 where average_days is null',0,'OK','',''),
(485,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_key_flex\', \'set_relay2parallel_to_relay1\')','',525,'2018-05-22 11:22:39','\0','update cw_terminal_key_flex.set_relay2parallel_to_relay1 = false','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_terminal_key_flex set set_relay2parallel_to_relay1 = 0','update cw_terminal_key_flex set set_relay2parallel_to_relay1 = 0',0,'OK','',''),
(486,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_system_configuration\', \'class\')','',-100,'2018-05-22 11:22:39','\0','init systemConfiguration.class','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_system_configuration set class=\'at.clockwork.system.domain.SystemConfiguration\' where class is null or class = \'\'','update cw_system_configuration set class=\'at.clockwork.system.domain.SystemConfiguration\' where class is null or class = \'\'',0,'OK','',''),
(487,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_general_validation\', \'priority_for_system_configurations\')','',527,'2018-05-22 11:22:39','\0','init GeneralValidation.priorityForSystemConfigurations','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_general_validation set priority_for_system_configurations = 0 where priority_for_system_configurations is null','update cw_general_validation set priority_for_system_configurations = 0 where priority_for_system_configurations is null',0,'OK','',''),
(488,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_system_configuration\', \'rewritable_in_general_validation\')','',-1,'2018-05-22 11:22:39','\0','init SystemConfiguration.rewritableInGeneralValidation','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_system_configuration set rewritable_in_general_validation = 0 where rewritable_in_general_validation is null','update cw_system_configuration set rewritable_in_general_validation = 0 where rewritable_in_general_validation is null',0,'OK','',''),
(489,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_system_configuration\', \'rewritable_in_general_validation\')','',529,'2018-05-22 11:22:39','\0','set SystemConfiguration.rewritableInGeneralValidation: 601, 602, 603, 605, 606, 607, 611, 612','','2018-05-22 11:22:40','2018-05-22 11:22:40','','','',0,'OK','','import at.clockwork.common.domain.GeneralValidation\nimport at.clockwork.common.generalValidation.domain.GeneralValidation2SystemConfiguration\nimport at.clockwork.system.domain.SystemConfiguration\nimport grails.util.Holders\n\nclass UpdateScriptService {\n\n	def systemConfigurationWriteService = Holders.grailsApplication.mainContext.getBean \'systemConfigurationWriteService\'\n\n	def run(def connection, def dataSourceFields) {\n\n		def gormCriteria = SystemConfiguration.createCriteria()\n		def systemConfigurationList = gormCriteria {\n\n			and {\n				\'in\'(\"cwID\", [601, 602, 603, 604, 605, 606, 607, 611, 612])\n				eq(\"deleted\", false)\n			}\n\n		}\n\n		systemConfigurationList.each{ systemConfiguration ->\n\n            systemConfiguration.rewritableInGeneralValidation = true\n            systemConfigurationWriteService.save(systemConfiguration)\n\n		}\n\n		true\n	}\n}'),
(490,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_gantner\', \'number_of_bookings\')','',530,'2018-05-22 11:22:39','\0','init cw_terminal_gantner.number_of_bookings = 0','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_terminal_gantner set number_of_bookings = 0 where number_of_bookings is null','update cw_terminal_gantner set number_of_bookings = 0 where number_of_bookings is null',0,'OK','',''),
(491,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_gantner\', \'number_of_text\')','',531,'2018-05-22 11:22:39','\0','init cw_terminal_gantner.number_of_text = 0','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_terminal_gantner set number_of_text = 0 where number_of_text is null','update cw_terminal_gantner set number_of_text = 0 where number_of_text is null',0,'OK','',''),
(492,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_gantner\', \'number_of_cost_units\')','',532,'2018-05-22 11:22:39','\0','init cw_terminal_gantner.number_of_cost_units = 0','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_terminal_gantner set number_of_cost_units = 0 where number_of_cost_units is null','update cw_terminal_gantner set number_of_cost_units = 0 where number_of_cost_units is null',0,'OK','',''),
(493,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_gantner\', \'number_of_orders\')','',533,'2018-05-22 11:22:39','\0','init cw_terminal_gantner.number_of_orders = 0','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_terminal_gantner set number_of_orders = 0 where number_of_orders is null','update cw_terminal_gantner set number_of_orders = 0 where number_of_orders is null',0,'OK','',''),
(494,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_gantner\', \'number_of_workplaces\')','',534,'2018-05-22 11:22:39','\0','init cw_terminal_gantner.number_of_workplaces = 0','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_terminal_gantner set number_of_workplaces = 0 where number_of_workplaces is null','update cw_terminal_gantner set number_of_workplaces = 0 where number_of_workplaces is null',0,'OK','',''),
(495,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_gantner\', \'number_of_workprocesses\')','',535,'2018-05-22 11:22:39','\0','init cw_terminal_gantner.number_of_workprocesses = 0','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_terminal_gantner set number_of_workprocesses = 0 where number_of_workprocesses is null','update cw_terminal_gantner set number_of_workprocesses = 0 where number_of_workprocesses is null',0,'OK','',''),
(496,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_terminal_gantner\', \'number_of_absences\')','',536,'2018-05-22 11:22:39','\0','init cw_terminal_gantner.number_of_absences = 0','','2018-05-22 11:22:40','2018-05-22 11:22:40','','update cw_terminal_gantner set number_of_absences = 0 where number_of_absences is null','update cw_terminal_gantner set number_of_absences = 0 where number_of_absences is null',0,'OK','',''),
(497,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_keyflex_door_day_access_schedule\', \'active_from_first_access\')','',537,'2018-05-22 11:22:39','\0','init cw_keyflex_door_day_access_schedule.active_from_first_access = false','','2018-05-22 11:22:40','2022-11-04 07:48:16','','update cw_keyflex_door_day_access_schedule set active_from_first_access = 0 where active_from_first_access is null','update cw_keyflex_door_day_access_schedule set active_from_first_access = 0 where active_from_first_access is null',0,'OK','',''),
(498,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_keyflex_door_access_schedule\', \'active_from_first_access\')','',538,'2018-05-22 11:22:39','\0','drop cw_keyflex_door_access_schedule.active_from_first_access','','2018-05-22 11:22:40','2018-05-22 11:22:40','','alter table cw_keyflex_door_access_schedule drop column active_from_first_access','alter table cw_keyflex_door_access_schedule drop column active_from_first_access',0,'OK','',''),
(499,2,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',539,'2018-05-22 11:22:39','\0','delete sorex-Menues','','2018-05-22 11:22:40','2019-02-25 18:36:23','','','',0,'OK','','import at.clockwork.security.domain.*\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		Menu.executeQuery(\"select id from Menu where name like \'%Sorex%\'\").each {\n		    Menu menu = Menu.get(it)\n		    if (menu) {\n			    OperatorType2Menu.executeUpdate(\"delete from OperatorType2Menu where menu=?\", menu)\n			    OperatorType2AutoStartedMenu.executeUpdate(\"delete from OperatorType2AutoStartedMenu where menu=?\", menu)\n			    menu.delete(flush:true)\n			}\n		}\n\n		true\n	}\n}'),
(500,2,'at.clockwork.system.service.DataSourceService.existsTableInDatabase(connection, \'cw_menu\')','',540,'2018-05-22 11:22:39','\0','delete old menus','','2018-05-22 11:22:40','2019-02-25 18:36:23','','','',0,'OK','','import at.clockwork.security.domain.*\n\nclass UpdateScriptService {\n\n	def run(def connection, def dataSourceFields) {\n\n		Menu.executeQuery(\"select id from Menu where deleted = 1\").each {\n		    Menu menu = Menu.get(it)\n		    if (menu) {\n			    OperatorType2Menu.executeUpdate(\"delete from OperatorType2Menu where menu=?\", menu)\n			    User2Menu.executeUpdate(\"delete from User2Menu where menu=?\", menu)\n			    OperatorType2AutoStartedMenu.executeUpdate(\"delete from OperatorType2AutoStartedMenu where menu=?\", menu)\n			    menu.delete(flush:true)\n			}\n		}\n\n		Menu.executeQuery(\"select id from Menu where name = \'keyflexPersonWeekSchedule\'\").each {\n		    Menu menu = Menu.get(it)\n		    if (menu) {\n			    OperatorType2Menu.executeUpdate(\"delete from OperatorType2Menu where menu=?\", menu)\n			    User2Menu.executeUpdate(\"delete from User2Menu where menu=?\", menu)\n			    OperatorType2AutoStartedMenu.executeUpdate(\"delete from OperatorType2AutoStartedMenu where menu=?\", menu)\n			    menu.delete(flush:true)\n			}\n		}\n\n		Menu.executeQuery(\"select id from Menu where name = \'cCostUnitCategory\'\").each {\n		    Menu menu = Menu.get(it)\n		    if (menu) {\n			    OperatorType2Menu.executeUpdate(\"delete from OperatorType2Menu where menu=?\", menu)\n			    User2Menu.executeUpdate(\"delete from User2Menu where menu=?\", menu)\n			    OperatorType2AutoStartedMenu.executeUpdate(\"delete from OperatorType2AutoStartedMenu where menu=?\", menu)\n			    menu.delete(flush:true)\n			}\n		}\n\n		true\n	}\n}'),
(501,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'value_like_presence\')','',541,'2018-05-22 11:22:39','\0','init cw_absence.valueLikePresence = false','','2018-05-22 11:22:40','2022-11-04 07:48:16','','update cw_absence set value_like_presence = 0 where value_like_presence is null','update cw_absence set value_like_presence = 0 where value_like_presence is null',0,'OK','',''),
(502,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'calculate_the_next_day\')','',542,'2018-05-22 11:22:39','\0','init cw_absence.calculateTheNextDay = false','','2018-05-22 11:22:40','2022-11-04 07:48:16','','update cw_absence set calculate_the_next_day = 0 where calculate_the_next_day is null','update cw_absence set calculate_the_next_day = 0 where calculate_the_next_day is null',0,'OK','',''),
(503,2,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_absence\', \'show_in_legend\')','',543,'2018-05-22 11:22:39','\0','init cw_absence.showInLegend = false','','2018-05-22 11:22:40','2022-11-04 07:48:16','','update cw_absence set show_in_legend = 0 where show_in_legend is null','update cw_absence set show_in_legend = 0 where show_in_legend is null',0,'OK','',''),
(504,1,'at.clockwork.system.service.DataSourceService.existsFieldInDatabaseTable(connection, \'cw_work_time_manual\', \'time_from\')','',544,'2018-08-28 10:51:52','\0','drop cw_work_time_manual.time_from','','2018-08-28 10:51:52','2018-08-28 10:51:52','','alter table cw_work_time_manual drop column time_from','alter table cw_work_time_manual drop column time_from',0,'OK','',''),
