-- Table structure for table `cw_update_information`
--

CREATE TABLE `cw_update_information` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `domain_class` varchar(255) NOT NULL,
  `domain_class_id_after_update` bigint(20) NOT NULL,
  `domain_class_id_before_update` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_update_information`
--


--
-- Table structure for table `cw_user`
--

CREATE TABLE `cw_user` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `account_expired` bit(1) NOT NULL,
  `account_locked` bit(1) NOT NULL,
  `company2contact_id` bigint(20) DEFAULT NULL,
  `date_created` datetime DEFAULT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `description2` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `email_show` bit(1) NOT NULL,
  `enabled` bit(1) NOT NULL,
  `last_updated` datetime DEFAULT NULL,
  `passwd` varchar(255) NOT NULL,
  `password_expired` bit(1) NOT NULL,
  `person_id` bigint(20) DEFAULT NULL,
  `user_category_id` bigint(20) NOT NULL,
  `user_real_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `username` varchar(255) NOT NULL,
  `programmatically_login` bit(1) DEFAULT NULL,
  `update_counter` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_hegrjm6vteyggd3kpb187ssjy` (`username`),
  KEY `FKnndkl486yyf74q5og3yvgt3hn` (`company2contact_id`),
  KEY `FK7rdxf69kkyu1bn3h2kfkc0tga` (`person_id`),
  KEY `FKbgb7hpyqr0nqw7k9kgifxawig` (`user_category_id`),
  CONSTRAINT `FK7rdxf69kkyu1bn3h2kfkc0tga` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKbgb7hpyqr0nqw7k9kgifxawig` FOREIGN KEY (`user_category_id`) REFERENCES `cw_user_category` (`id`),
  CONSTRAINT `FKnndkl486yyf74q5og3yvgt3hn` FOREIGN KEY (`company2contact_id`) REFERENCES `cw_company_2_contact` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user`
--

INSERT INTO `cw_user` VALUES
(1,0,'\0','\0',NULL,'2018-02-07 00:37:02','\0','clockwork','','office@clockwork.at','\0','','2018-02-07 00:37:02','8b68f8e68902018bb2efef351ce3a1dbbf957d59','\0',NULL,1,'clockwork','clockwork','\0',0),
(2,0,'\0','\0',NULL,'2018-05-22 12:12:59','\0','','','admin@clockwork.at','\0','','2018-05-22 12:12:59','d033e22ae348aeb5660fc2140aec35850c4da997','',NULL,1,'Administrator','admin','\0',0),
(3,0,'\0','\0',NULL,'2020-02-04 15:25:08','\0','','','','\0','','2020-02-04 15:25:08','7280f9cc194c00060ae02b05516b91121e6dddff','',NULL,1,'Zutrittskontrolle','zuko','\0',0),
(4,0,'\0','\0',NULL,'2020-02-04 15:25:55','\0','','','','\0','','2020-02-04 15:25:55','2bb752d34e3769e33651b9980614905b46f6f288','',NULL,1,'Personalzeit','pze','\0',0);

--
-- Table structure for table `cw_user_2_menu`
--

CREATE TABLE `cw_user_2_menu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `executable` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `menu_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKiqy3bwb9mcomrq5bnhc4vtge2` (`menu_id`),
  KEY `FKcn8ol4ctg8cmnye4dkd6vaddm` (`user_id`),
  CONSTRAINT `FKcn8ol4ctg8cmnye4dkd6vaddm` FOREIGN KEY (`user_id`) REFERENCES `cw_user` (`id`),
  CONSTRAINT `FKiqy3bwb9mcomrq5bnhc4vtge2` FOREIGN KEY (`menu_id`) REFERENCES `cw_menu` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_2_menu`
--


--
-- Table structure for table `cw_user_2_operator_type`
--

CREATE TABLE `cw_user_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,
  `taken_over_from_id` bigint(20) DEFAULT NULL,
  `user_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKlaijqkmaa0qsw116fn07y45gc` (`general_validation_id`),
  KEY `FKgd89e7v3b13k2clds8rcmfn5j` (`operator_type_id`),
  KEY `FKwhx8xfss33fe0ww2k8a3tipe` (`person_category_id`),
  KEY `FKhuh2bebtcuthx0ihvldg2ork8` (`taken_over_from_id`),
  KEY `FK4760ygx7g1l5jf8nhitcqugos` (`user_id`),
  CONSTRAINT `FK4760ygx7g1l5jf8nhitcqugos` FOREIGN KEY (`user_id`) REFERENCES `cw_user` (`id`),
  CONSTRAINT `FKgd89e7v3b13k2clds8rcmfn5j` FOREIGN KEY (`operator_type_id`) REFERENCES `cw_operator_type` (`id`),
  CONSTRAINT `FKhuh2bebtcuthx0ihvldg2ork8` FOREIGN KEY (`taken_over_from_id`) REFERENCES `cw_user` (`id`),
  CONSTRAINT `FKlaijqkmaa0qsw116fn07y45gc` FOREIGN KEY (`general_validation_id`) REFERENCES `cw_general_validation` (`id`),
  CONSTRAINT `FKwhx8xfss33fe0ww2k8a3tipe` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_2_operator_type`
--

INSERT INTO `cw_user_2_operator_type` VALUES
(1,0,'2018-02-07 00:37:02','\0',NULL,NULL,'2018-02-07 00:37:02',2,NULL,NULL,NULL,1),
(2,0,'2018-02-07 12:53:17','\0',NULL,NULL,'2018-02-07 12:53:17',3,NULL,NULL,NULL,1),
(3,1,'2018-05-22 12:12:59','\0',NULL,NULL,'2020-02-04 15:30:20',6,NULL,NULL,NULL,2),
(4,1,'2018-05-22 12:12:59','',NULL,NULL,'2020-02-04 15:31:24',3,NULL,NULL,NULL,2),
(5,0,'2019-05-22 12:56:44','\0',NULL,NULL,'2019-05-22 12:56:44',5,NULL,NULL,NULL,1),
(6,0,'2020-02-04 15:25:29','\0',NULL,NULL,'2020-02-04 15:25:29',5,NULL,NULL,NULL,3),
(7,0,'2020-02-04 15:25:30','\0',NULL,NULL,'2020-02-04 15:25:30',7,NULL,NULL,NULL,3),
(8,0,'2020-02-04 15:26:04','\0',NULL,NULL,'2020-02-04 15:26:04',3,NULL,NULL,NULL,4);

--
-- Table structure for table `cw_user_2_operator_type_2_person_bl`
--

CREATE TABLE `cw_user_2_operator_type_2_person_bl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `user2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK1ht1lcuo4lqnxtn7rcl88t7jh` (`person_id`),
  KEY `FK1a08nievnrl9pgy8jkbg78d7s` (`user2operator_type_id`),
  CONSTRAINT `FK1a08nievnrl9pgy8jkbg78d7s` FOREIGN KEY (`user2operator_type_id`) REFERENCES `cw_user_2_operator_type` (`id`),
  CONSTRAINT `FK1ht1lcuo4lqnxtn7rcl88t7jh` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_2_operator_type_2_person_bl`
--


--
-- Table structure for table `cw_user_2_operator_type_2_person_category_bl`
--

CREATE TABLE `cw_user_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,
  `user2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK2dq47ykyxx637gtb83soay6v3` (`person_category_id`),
  KEY `FKqic2lkuivukeykp23kww3mcc8` (`user2operator_type_id`),
  CONSTRAINT `FK2dq47ykyxx637gtb83soay6v3` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`),
  CONSTRAINT `FKqic2lkuivukeykp23kww3mcc8` FOREIGN KEY (`user2operator_type_id`) REFERENCES `cw_user_2_operator_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_2_operator_type_2_person_category_bl`
--


--
-- Table structure for table `cw_user_2_operator_type_2_person_category_wl`
--

CREATE TABLE `cw_user_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,
  `user2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKlw6emp39dtsaxeoinu6kcrny7` (`person_category_id`),
  KEY `FKthm52ugufe8iu2dh2l6iag8qc` (`user2operator_type_id`),
  CONSTRAINT `FKlw6emp39dtsaxeoinu6kcrny7` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`),
  CONSTRAINT `FKthm52ugufe8iu2dh2l6iag8qc` FOREIGN KEY (`user2operator_type_id`) REFERENCES `cw_user_2_operator_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_2_operator_type_2_person_category_wl`
--


--
-- Table structure for table `cw_user_2_operator_type_2_person_wl`
--

CREATE TABLE `cw_user_2_operator_type_2_person_wl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `user2operator_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKbd0yy22hqakj7dj1tb236ci7n` (`person_id`),
  KEY `FK6ymmmovhysu8l58v0onhuhub8` (`user2operator_type_id`),
  CONSTRAINT `FK6ymmmovhysu8l58v0onhuhub8` FOREIGN KEY (`user2operator_type_id`) REFERENCES `cw_user_2_operator_type` (`id`),
  CONSTRAINT `FKbd0yy22hqakj7dj1tb236ci7n` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_2_operator_type_2_person_wl`
--


--
-- Table structure for table `cw_user_category`
--

CREATE TABLE `cw_user_category` (
  `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,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_category`
--

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

--
-- Table structure for table `cw_user_operator_role`
--

CREATE TABLE `cw_user_operator_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT 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,
  `transfered_from_user_id` bigint(20) DEFAULT NULL,
  `user_id` bigint(20) NOT NULL,
  `valid_from` datetime DEFAULT NULL,
  `valid_to` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKr73xy1q9k3wbvjid1op1e2qhw` (`general_validation_id`),
  KEY `FKp8nhm70uii6sekodk7ipd3q5u` (`operator_type_id`),
  KEY `FK2ysqmycpjv9vaogsg08sxhfab` (`person_category_id`),
  KEY `FKr8r8c7higi1qhxbktict4pd7f` (`transfered_from_user_id`),
  KEY `user_idx` (`user_id`),
  CONSTRAINT `FK1oj3htn0ywahvphs1obb9hmhf` FOREIGN KEY (`user_id`) REFERENCES `cw_user` (`id`),
  CONSTRAINT `FK2ysqmycpjv9vaogsg08sxhfab` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`),
  CONSTRAINT `FKp8nhm70uii6sekodk7ipd3q5u` FOREIGN KEY (`operator_type_id`) REFERENCES `cw_operator_type` (`id`),
  CONSTRAINT `FKr73xy1q9k3wbvjid1op1e2qhw` FOREIGN KEY (`general_validation_id`) REFERENCES `cw_general_validation` (`id`),
  CONSTRAINT `FKr8r8c7higi1qhxbktict4pd7f` FOREIGN KEY (`transfered_from_user_id`) REFERENCES `cw_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_operator_role`
--


--
-- Table structure for table `cw_user_operator_role_cw_person`
--

CREATE TABLE `cw_user_operator_role_cw_person` (
  `user_operator_role_blacklist_persons_id` bigint(20) NOT NULL,
  `person_id` bigint(20) DEFAULT NULL,
  `user_operator_role_whitelist_persons_id` bigint(20) NOT NULL,
  KEY `FKipfe26hi5nkry2l5mm5ad7l15` (`person_id`),
  KEY `FKj7v82reuvffqmes1a3lkji2tl` (`user_operator_role_blacklist_persons_id`),
  KEY `FKk5oyp5j417ie34ogssc1jtj7i` (`user_operator_role_whitelist_persons_id`),
  CONSTRAINT `FKipfe26hi5nkry2l5mm5ad7l15` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKj7v82reuvffqmes1a3lkji2tl` FOREIGN KEY (`user_operator_role_blacklist_persons_id`) REFERENCES `cw_user_operator_role` (`id`),
  CONSTRAINT `FKk5oyp5j417ie34ogssc1jtj7i` FOREIGN KEY (`user_operator_role_whitelist_persons_id`) REFERENCES `cw_user_operator_role` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_operator_role_cw_person`
--


--
-- Table structure for table `cw_user_operator_role_cw_person_category`
--

CREATE TABLE `cw_user_operator_role_cw_person_category` (
  `user_operator_role_blacklist_person_categories_id` bigint(20) NOT NULL,
  `person_category_id` bigint(20) DEFAULT NULL,
  `user_operator_role_whitelist_person_categories_id` bigint(20) NOT NULL,
  KEY `FKcjfw9s1toxwn3ygvml7mt5iw6` (`person_category_id`),
  KEY `FKr67v5rpfo4sfagan51h571chw` (`user_operator_role_blacklist_person_categories_id`),
  KEY `FK2fyofog41j8ew4iwvrlrampud` (`user_operator_role_whitelist_person_categories_id`),
  CONSTRAINT `FK2fyofog41j8ew4iwvrlrampud` FOREIGN KEY (`user_operator_role_whitelist_person_categories_id`) REFERENCES `cw_user_operator_role` (`id`),
  CONSTRAINT `FKcjfw9s1toxwn3ygvml7mt5iw6` FOREIGN KEY (`person_category_id`) REFERENCES `cw_person_category` (`id`),
  CONSTRAINT `FKr67v5rpfo4sfagan51h571chw` FOREIGN KEY (`user_operator_role_blacklist_person_categories_id`) REFERENCES `cw_user_operator_role` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_operator_role_cw_person_category`
--


--
-- Table structure for table `cw_user_role`
--

CREATE TABLE `cw_user_role` (
  `role_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  PRIMARY KEY (`role_id`,`user_id`),
  KEY `FK1rutbkdcqu3gd9psl20det99k` (`user_id`),
  CONSTRAINT `FK1rutbkdcqu3gd9psl20det99k` FOREIGN KEY (`user_id`) REFERENCES `cw_user` (`id`),
  CONSTRAINT `FK35bk9ar6tej5jcpsrr9tlvha0` FOREIGN KEY (`role_id`) REFERENCES `cw_role` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_user_role`
--

INSERT INTO `cw_user_role` VALUES
(1,1),
(1,2),
(1,3),
(1,4),
(2,1),
(3,1),
(4,1),
(5,1),
(6,1),
(7,1),
(8,1),
(9,1),
(10,1),
(11,1),
(11,2),
(11,3),
(11,4),
(12,1),
(13,1),
(14,1),
(15,1),
(16,1),
(17,1),
(18,1),
(19,1);

--
-- Table structure for table `cw_uuid`
--

CREATE TABLE `cw_uuid` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `clockwork_customeruuid` longblob NOT NULL,
  `clockwork_id` bigint(20) NOT NULL,
  `domain_class` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_uuid`
--


--
-- Table structure for table `cw_vehicle_type`
--

CREATE TABLE `cw_vehicle_type` (
  `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,
  `number` varchar(255) NOT NULL,
  `vehicle_type_category_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK86ef05r6pin9box29j2k3jlrp` (`vehicle_type_category_id`),
  CONSTRAINT `FK86ef05r6pin9box29j2k3jlrp` FOREIGN KEY (`vehicle_type_category_id`) REFERENCES `cw_vehicle_type_category` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_vehicle_type`
--


--
-- Table structure for table `cw_vehicle_type_category`
--

CREATE TABLE `cw_vehicle_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` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_vehicle_type_category`
--


--
-- Table structure for table `cw_web_app`
--

CREATE TABLE `cw_web_app` (
  `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,
  `web_app_config_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK7a61cgrl23m3hafg1txq4t4my` (`web_app_config_id`),
  CONSTRAINT `FK7a61cgrl23m3hafg1txq4t4my` FOREIGN KEY (`web_app_config_id`) REFERENCES `cw_web_app_config` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_web_app`
--

INSERT INTO `cw_web_app` VALUES
(1,0,'2021-04-02 22:25:33','\0','Test-Web-Applikation 1','2021-04-02 22:25:33','Test1',0,1);

--
-- Table structure for table `cw_web_app_2_web_app_list`
--

CREATE TABLE `cw_web_app_2_web_app_list` (
  `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,
  `update_counter` int(11) NOT NULL,
  `web_app_id` bigint(20) NOT NULL,
  `web_app_list_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKkc3mn0gvxa8p79eixff36ou1h` (`web_app_id`),
  KEY `FK2f5bhjsme45d8w4iqbnqcfdu0` (`web_app_list_id`),
  CONSTRAINT `FK2f5bhjsme45d8w4iqbnqcfdu0` FOREIGN KEY (`web_app_list_id`) REFERENCES `cw_web_app_list` (`id`),
  CONSTRAINT `FKkc3mn0gvxa8p79eixff36ou1h` FOREIGN KEY (`web_app_id`) REFERENCES `cw_web_app` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_web_app_2_web_app_list`
--

INSERT INTO `cw_web_app_2_web_app_list` VALUES
(1,0,'2021-04-02 22:25:33','\0','2021-04-02 22:25:33',1,0,1,2),
(2,0,'2021-04-02 22:25:33','\0','2021-04-02 22:25:33',2,0,1,3),
(3,0,'2021-04-02 22:25:33','\0','2021-04-02 22:25:33',3,0,1,1),
(4,0,'2021-04-02 22:25:33','\0','2021-04-02 22:25:33',4,0,1,4);

--
-- Table structure for table `cw_web_app_2_web_app_menu`
--

CREATE TABLE `cw_web_app_2_web_app_menu` (
  `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,
  `update_counter` int(11) NOT NULL,
  `web_app_id` bigint(20) NOT NULL,
  `web_app_menu_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK9fj8exg817biujr2p33dbp1g` (`web_app_id`),
  KEY `FKix8wwmopnaffds11n45hx60fc` (`web_app_menu_id`),
  CONSTRAINT `FK9fj8exg817biujr2p33dbp1g` FOREIGN KEY (`web_app_id`) REFERENCES `cw_web_app` (`id`),
  CONSTRAINT `FKix8wwmopnaffds11n45hx60fc` FOREIGN KEY (`web_app_menu_id`) REFERENCES `cw_web_app_menu` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_web_app_2_web_app_menu`
--

INSERT INTO `cw_web_app_2_web_app_menu` VALUES
(1,0,'2021-04-02 22:26:49','\0','2021-04-02 22:26:49',1,0,1,21),
(2,0,'2021-04-02 22:26:49','\0','2021-04-02 22:26:49',2,0,1,20),
(3,0,'2021-04-02 22:26:49','\0','2021-04-02 22:26:49',4,0,1,14),
(4,0,'2021-04-02 22:26:49','\0','2021-04-02 22:26:49',3,0,1,2);

--
-- Table structure for table `cw_web_app_2_web_app_table`
--

CREATE TABLE `cw_web_app_2_web_app_table` (
  `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,
  `update_counter` int(11) NOT NULL,
  `web_app_id` bigint(20) NOT NULL,
  `web_app_table_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKkikyojhygrd3gik55dh8mypqf` (`web_app_id`),
  KEY `FKivwmv4l6ra8n2pj3xa32twnjq` (`web_app_table_id`),
  CONSTRAINT `FKivwmv4l6ra8n2pj3xa32twnjq` FOREIGN KEY (`web_app_table_id`) REFERENCES `cw_web_app_table` (`id`),
  CONSTRAINT `FKkikyojhygrd3gik55dh8mypqf` FOREIGN KEY (`web_app_id`) REFERENCES `cw_web_app` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_web_app_2_web_app_table`
--

INSERT INTO `cw_web_app_2_web_app_table` VALUES
(1,0,'2021-04-02 22:26:49','\0','2021-04-02 22:26:49',1,0,1,1),
(2,0,'2021-04-02 22:26:49','\0','2021-04-02 22:26:49',2,0,1,2);

--
-- Table structure for table `cw_web_app_config`
--

CREATE TABLE `cw_web_app_config` (
  `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,
  `sequence1` longtext DEFAULT 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_web_app_config`
--

INSERT INTO `cw_web_app_config` VALUES
(1,1,'2020-05-25 12:46:57','\0','Konfiguration','2021-04-02 22:14:27','Konfig','{\n      loggedIn: false,\n      menu: {\n        standardId: 0,\n        title: {\n          text: \"Hauptmenü\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Hauptmenü-Sub\",\n          style: {}\n        }\n      }\n    }',0);

--
-- Table structure for table `cw_web_app_list`
--

CREATE TABLE `cw_web_app_list` (
  `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,
  `sequence1` longtext DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_web_app_list`
--

INSERT INTO `cw_web_app_list` VALUES
(1,3,'2020-09-21 08:41:39','\0','WorkComponents','2021-04-02 22:16:15','workComponents','      {\n        name: \"workComponents\",\n        fields: [\n          {\n            name: \"dbId\"\n          },\n          {\n            name: \"number\"\n          },\n          {\n            name: \"desc1\"\n          }\n        ],\n        entries: [\n        ]\n      }',0),
(2,1,'2020-10-02 23:11:57','\0','Balances','2021-04-02 22:16:07','balances','      {\n        name: \"balances\",\n        fields: [\n          {\n            name: \"name\"\n          },\n          {\n            name: \"value\"\n          }\n        ],\n        entries: [\n        ]\n      }',0),
(3,4,'2020-10-02 23:13:14','\0','TimeBookings','2021-04-02 22:16:22','timeBookings','      {\n        name: \"timeBookings\",\n        fields: [\n          {\n            name: \"date\"\n          },\n          {\n            name: \"time\"\n          },\n          {\n            name: \"bookingType\"\n          },\n          {\n            name: \"info\"\n          }\n        ],\n        entries: [\n        ]\n      }',0),
(4,1,'2021-04-02 22:15:01','\0','Absences','2021-04-02 22:15:55','absences','            {\n                name: \"absences\",\n                fields: [\n                    {\n                        name: \"number\"\n                    },\n                    {\n                        name: \"description\"\n                    }\n                ],\n                entries: [\n                    {number: \"31\", desc1: \"Arzt\"},\n                    {number: \"36\", desc1: \"Behörde\"}\n                ]\n            }',0);

--
-- Table structure for table `cw_web_app_menu`
--

CREATE TABLE `cw_web_app_menu` (
  `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,
  `sequence1` longtext DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_web_app_menu`
--

INSERT INTO `cw_web_app_menu` VALUES
(1,6,'2020-05-25 12:48:25','\0','331_KommenFG list','2021-04-02 22:18:10','331_KommenFG list','{\n        id: 331,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Kommen mit Fehlgrund\",\n          style: {}\n        },\n        subTitle: {\n          text: \"KommenAW-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 3111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 3112,\n            type: \"input\",\n            sources: [\"fromList\"],\n            list: \"absences\",\n            tableField: \"absenceNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"desc1\",\n            title: {\n              text: \"Fehlgrund\",\n              style: {}\n            },\n            searchable: true\n          },\n          {\n            id: 3113,\n            type: \"constant\",\n            value: \"C\",\n            displayValue: \"Kommen\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 3114,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 3115,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"absenceNumber\",\n                title: {\n                  text: \"Fehlgrund\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 3116,\n            type: \"save\"\n          },\n          {\n            id: 3117,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(2,4,'2020-05-25 12:48:44','\0','511_Buchungsübersicht','2021-04-02 22:19:52','511_Buchungsübersicht','{\n        id: 511,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Buchungen\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Buchungen-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 5111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 5112,\n            type: \"httpGetRequest\",\n            list: \"timeBookings\",\n            controllerName: \"secClockworkTimeBookingsInfo\",\n            parameter1Key: \"personNumber\",\n            parameter1Value: \"personNumber\",\n            parameter2Key: \"days\",\n            static2Value: 1\n          },\n          {\n            id: 5113,\n            type: \"showOverview\",\n	    list:\"timeBookings\",\n            listedColumns: [\n              {\n                columnName: \"date\",\n                title: {\n                  text: \"Datum\",\n                  style: {\n			width:120\n		}\n                }\n              },\n              {\n                columnName: \"time\",\n                title: {\n                  text: \"Zeit\",\n                  style: {\n			width:75\n		}\n                }\n              },\n              {\n                columnName: \"bookingType\",\n                title: {\n                  text: \"K/G\",\n                  style: {\n			width:50\n		}\n                }\n              },\n              {\n                columnName: \"info\",\n                title: {\n                  text: \"Info\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n               {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          }\n\n        ]\n      }',0),
(3,5,'2020-05-25 12:49:00','\0','1121_Anfang from Table','2021-04-02 22:19:14','1121_Anfang from Table','{\n        id: 1121,\n        type: \"recording\",\n        table: \"work\",\n        title: {\n          text: \"Auftrag Table\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Anfang-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 11211,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 11212,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"order\",\n            tableField: \"orderNumber\",\n            tableField2: \"orderDesc1\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {\n			width:100\n		  }\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                fieldName2: \"desc2\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"number\",\n            valueField2: \"desc1\",\n            displayValueField2: \"desc1\",\n            title: {\n              text: \"Auftrag\",\n              style: {}\n            },\n		searchable:true\n          },\n          {\n            id: 11213,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"workprocess\",\n            tableField: \"workprocessNumber\",\n            tableField2: \"workprocessDesc1\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {\n			width:100\n		  }\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                fieldName2: \"desc2\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"number\",\n            valueField2: \"desc1\",\n            displayValueField2: \"desc1\",\n            title: {\n              text: \"Arbeitsgang\",\n              style: {}\n            },\n		searchable:true\n          },\n          {\n            id: 11214,\n            type: \"constant\",\n            value: \"B\",\n            displayValue: \"Anfang\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 11215,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 11216,\n            type: \"showOverview\",\n            listedColumns: [\n              {\n                fieldName: \"field\",\n                title: {\n                  text: \"Feldxx\",\n                  style: {\n			width:120\n		  }\n                }\n              },\n              {\n                fieldName: \"value\",\n                title: {\n                  text: \"Wertxx\",\n                  style: {}\n                }\n              }\n            ],\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"orderNumber\",\n                title: {\n                  text: \"Auftrag\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"orderDesc1\",\n                title: {\n                  text: \"A-Bez.\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"workprocessNumber\",\n                title: {\n                  text: \"Arbeitsgang\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"workprocessDesc1\",\n                title: {\n                  text: \"AG-Bez.\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ],\n		automatic:{\n			type:\"save\",\n			duration:5000,\n			title: {\n				text:\"Kontrolle\",\n				style:{}\n			}\n		}\n          },\n          {\n            id: 11217,\n            type: \"save\"\n          },\n          {\n            id: 11218,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(4,1,'2020-05-25 12:49:16','\0','9991_localStorage','2021-04-02 22:22:19','9991_localStorage','{\n        id: 9991,\n        type: \"localBookingStorage\",\n        title: {\n          text: \"local bookings\",\n          style: {}\n        },\n        subTitle: {\n          text: \"HTML5-Storage\",\n          style: {}\n        }\n      }',0),
(5,1,'2020-05-25 12:49:35','\0','9992_SystemConfiguration','2021-04-02 22:21:39','9992_SystemConfiguration','{\n        id: 9992,\n        type: \"systemConfiguration\",\n        title: {\n          text: \"system configurations\",\n          style: {}\n        },\n        subTitle: {\n          text: \"configurations\",\n          style: {}\n        }\n      }',0),
(6,3,'2020-05-25 12:49:49','\0','9993_SystemLog','2021-04-02 22:21:19','9993_SystemLog','{\n        id: 9993,\n        type: \"systemLog\",\n        title: {\n          text: \"system logs\",\n          style: {}\n        },\n        subTitle: {\n          text: \"systemlogs\",\n          style: {}\n        }\n      }',0),
(7,2,'2020-06-07 19:13:32','\0','9994_Synchronisation','2021-04-02 22:21:57','9994_Synchronisation','{\n        id: 9994,\n        type: \"synchronisation\",\n        title: {\n          text: \"sync data\",\n          style: {}\n        },\n        subTitle: {\n          text: \"synchronisation\",\n          style: {}\n        }\n      }',0),
(8,8,'2020-09-17 14:41:25','\0','141_Kommen NFC und GPS','2021-04-02 22:20:16','141_Kommen NFC und GPS','{\n        id: 141,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"KOMMEN mit NFC und GPS \",\n          style: {}\n        },\n        subTitle: {\n          text: \"KOMMEN\",\n          style: {}\n        },\n        items: [\n          {\n            id: 1211,\n            type: \"input\",\n            sources: [\"nfcReader\"],\n            tableField: \"identificationCode\",\n            title: {\n              text: \"Ausweis\",\n              style: {}\n            }\n          },\n          {\n            id: 1212,\n            type: \"calculation\",\n            tableField: \"identificationCode\",\n            calculation:\n              \'fields[\"identificationCode\"].replace(/:/g, \"\").toUpperCase()\',\n            displayCalculation: \'fields[\"identificationCodeDisplay\"]\'\n          },\n          {\n            id: 1213,\n            type: \"httpGetRequest\",\n            tableField: \"person\",\n            controllerName: \"secClockworkPersonInfo\",\n            parameter1Key: \"identificationCode\",\n            parameter1Value: \"identificationCode\"\n          },\n          {\n            id: 1214,\n            type: \"constant\",\n            value: \"C\",\n            displayValue: \"KOMMEN\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 1215,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 1216,\n            type: \"geolocation\",\n            tableField: \"gpsCoords\"\n          },\n          {\n            id: 1217,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"identificationCode\",\n                title: {\n                  text: \"Ausweis\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.number\",\n                title: {\n                  text: \"Personalnr.\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.firstname + person.person.surname\",\n                title: {\n                  text: \"Name\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"gpsCoords.errorMessage\",\n                title: {\n                  text: \"\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ],\n            automatic: {\n              type: \"save\",\n              title: {\n                text: \"Kontrolle\",\n                style: {}\n              },\n              duration: 5000\n            }\n          },\n          {\n            id: 1218,\n            type: \"save\"\n          },\n          {\n            id: 1219,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(9,1,'2020-09-17 15:07:19','\0','1111_Anfang from Table WorkCombination','2021-04-02 22:19:31','1111_Anfang from Table WorkCombination','{\n        id: 1111,\n        type: \"recording\",\n        table: \"work\",\n        title: {\n          text: \"Anfang WorkCombination\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Anfang-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 11111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n	    continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 11112,\n            type: \"constant\",\n            value: \"B\",\n            displayValue: \"Anfang\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 11113,\n            type: \"fillListByWorkCombinationTable\",\n            where:[\n            ],\n            sourceTable:{\n		name:\"workCombination\",\n		object:\"order\",\n		fields:[\"dbId\", \"number\", \"desc1\"]\n            },\n            targetList:{\n		clear:true,\n		unique:true,\n		name:workComponents,\n		fields:[\"dbId\", \"number\", \"desc1\"]\n            }\n          },\n          {\n            id: 11114,\n            type: \"input\",\n            sources: [\"fromList\"],\n            list: \"workComponents\",\n            tableField: \"orderNumber\",\n            dbIdTableField: \"orderDbId\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"desc1\",\n            title: {\n              text: \"Rückmeldenummer\",\n              style: {}\n            },\n            searchable: true\n          },\n          {\n            id: 11115,\n            type: \"fillListByWorkCombinationTable\",\n            where:[\n		{\n			recordDataFieldName:orderNumber,\n			sourceObject:\"order\",\n			sourceFieldname:\"number\"\n            	}\n            ],\n            sourceTable:{\n		name:\"workCombination\",\n		object:\"workprocess\",\n		fields:[\"dbId\", \"number\", \"desc1\"]\n            },\n            targetList:{\n		clear:true,\n		unique:true,\n		name:workComponents,\n		fields:[\"dbId\", \"number\", \"desc1\"]\n            }\n          },\n          {\n            id: 11116,\n            type: \"input\",\n            sources: [\"fromList\"],\n            list: \"workComponents\",\n            tableField: \"workprocessNumber\",\n            dbIdTableField: \"workprocessDbId\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"desc1\",\n            title: {\n              text: \"Belegungseinheit\",\n              style: {}\n            },\n            searchable: true\n          },\n          {\n            id: 11117,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 11118,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"orderNumber\",\n                title: {\n                  text: \"Rückmeldenummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"workprocessNumber\",\n                title: {\n                  text: \"Belegungseinheit\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 11119,\n            type: \"save\"\n          },\n          {\n            id: 11120,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(10,1,'2020-09-21 08:32:17','\0','411_GehenFG list','2021-04-02 22:18:29','411_GehenFG list','{\n        id: 411,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Gehen mit Fehlgrund\",\n          style: {}\n        },\n        subTitle: {\n          text: \"GehenAW-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 4111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 4112,\n            type: \"input\",\n            sources: [\"fromList\"],\n            list: \"absences\",\n            tableField: \"absenceNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"desc1\",\n            title: {\n              text: \"Fehlgrund\",\n              style: {}\n            },\n            searchable: true\n          },\n          {\n            id: 4113,\n            type: \"constant\",\n            value: \"G\",\n            displayValue: \"Gehen\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 4114,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 4115,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"absenceNumber\",\n                title: {\n                  text: \"Fehlgrund\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 4116,\n            type: \"save\"\n          },\n          {\n            id: 4117,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(11,6,'2020-10-02 09:20:16','\0','121_Kommen NFC','2021-04-02 22:21:00','121_Kommen NFC','{\n        id: 121,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"KOMMEN mit NFC\",\n          style: {}\n        },\n        subTitle: {\n          text: \"KOMMEN\",\n          style: {}\n        },\n        items: [\n          {\n            id: 1211,\n            type: \"input\",\n            sources: [\"nfcReader\"],\n            tableField: \"identificationCode\",\n            title: {\n              text: \"Ausweis\",\n              style: {}\n            }\n          },\n          {\n            id: 1212,\n            type: \"calculation\",\n            tableField: \"identificationCode\",\n            calculation:\n              \'fields[\"identificationCode\"].replace(/:/g, \"\").toUpperCase()\',\n            displayCalculation: \'fields[\"identificationCodeDisplay\"]\'\n          },\n          {\n            id: 1213,\n            type: \"httpGetRequest\",\n            tableField: \"person\",\n            controllerName: \"secClockworkPersonInfo\",\n            parameter1Key: \"identificationCode\",\n            parameter1Value: \"identificationCode\"\n          },\n          {\n            id: 1214,\n            type: \"constant\",\n            value: \"C\",\n            displayValue: \"KOMMEN\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 1215,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 1216,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"identificationCode\",\n                title: {\n                  text: \"Ausweis\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.number\",\n                title: {\n                  text: \"Personalnr.\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.firstname + person.person.surname\",\n                title: {\n                  text: \"Name\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ],\n            automatic: {\n              type: \"save\",\n              title: {\n                text: \"Kontrolle\",\n                style: {}\n              },\n              duration: 5000\n            }\n          },\n          {\n            id: 1217,\n            type: \"save\"\n          },\n          {\n            id: 1218,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(12,7,'2020-10-02 22:56:03','\0','131_Kommen GPS','2021-04-02 22:20:41','131_Kommen GPS','{\n        id: 131,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Kommen mit GPS\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Kommen-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 1311,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 1312,\n            type: \"constant\",\n            value: \"C\",\n            displayValue: \"Kommen\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 1313,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 1314,\n            type: \"geolocation\",\n            tableField: \"gpsCoords\"\n          },\n          {\n            id: 216,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"gpsCoords.errorMessage\",\n                title: {\n                  text: \"\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 1315,\n            type: \"save\"\n          },\n          {\n            id: 1316,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(13,8,'2020-10-02 22:57:16','\0','1131_Anfang Barcode with HttpRequest','2021-04-02 22:18:49','1131_Anfang Barcode with HttpRequest','{\n        id: 1113,\n        type: \"recording\",\n        table: \"work\",\n        title: {\n          text: \"Auftrag Barcode\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Anfang\",\n          style: {}\n        },\n        items: [\n          {\n            id: 11131,\n            type: \"input\",\n            sources: [\"keyboard\"],\n            regexp: {\n              muster: \"^[0-9]{2,8}$\",\n              flags: \"g\"\n            },\n            minSize: 3,\n            maxSize: 8,\n            tableField: \"personNumber\",\n            title: {\n              text: \"Personalnr.\",\n              style: {}\n            }\n          },\n          {\n            id: 11132,\n            type: \"calculation\",\n            tableField: \"personNumber\",\n            calculation: \'fields[\"personNumber\"].substring(2, 100)\',\n            displayCalculation:\n              \'fields[\"personNumberDisplay\"].substring(2, 100)\'\n          },\n          {\n            id: 11133,\n            type: \"constant\",\n            value: \"B\",\n            displayValue: \"Anfang\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 11134,\n            type: \"input\",\n            sources: [\"keyboard\"],\n            minSize: 3,\n            maxSize: 18,\n            tableField: \"orderNumber\",\n            title: {\n              text: \"Auftrag\",\n              style: {}\n            }\n          },\n          {\n            id: 11135,\n            type: \"calculation\",\n            tableField: \"orderNumber\",\n            calculation: \'fields[\"orderNumber\"].substring(3, 100)\',\n            displayCalculation: \'fields[\"orderNumberDisplay\"].substring(3, 100)\'\n          },\n          {\n            id: 11136,\n            type: \"input\",\n            sources: [\"keyboard\"],\n            minSize: 3,\n            maxSize: 10,\n            tableField: \"workprocessNumber\",\n            title: {\n              text: \"Arbeitsgang\",\n              style: {}\n            }\n          },\n          {\n            id: 11137,\n            type: \"calculation\",\n            tableField: \"workprocessNumber\",\n            calculation: \'fields[\"workprocessNumber\"].substring(2, 100)\',\n            displayCalculation:\n              \'fields[\"workprocessNumberDisplay\"].substring(2, 100)\'\n          },\n          {\n            id: 11138,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n               id: 11139,\n               type: \"httpGetRequest\",\n               tableField: \"person\",\n               controllerName: \"secClockworkPersonInfo\",\n               parameter1Key: \"personNumber\",\n               parameter1Value: \"personNumber\"\n          },\n          {\n               id: 11140,\n               type: \"httpGetRequest\",\n               tableField: \"order\",\n               controllerName: \"secClockworkOrderInfo\",\n               parameter1Key: \"orderNumber\",\n               parameter1Value: \"orderNumber\"\n          },\n          {\n               id: 11141,\n               type: \"httpGetRequest\",\n               tableField: \"workprocess\",\n               controllerName: \"secClockworkWorkprocessInfo\",\n               parameter1Key: \"workprocessNumber\",\n               parameter1Value: \"workprocessNumber\"\n          },\n          {\n            id: 11142,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Personalnr.\",\n                  style: {}\n                }\n              },\n              {\n                  fieldName: \"person.person.firstname + person.person.surname\",\n                  title: {\n                      text: \"Name\",\n                      style: {}\n                   }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"orderNumber\",\n                title: {\n                  text: \"Auftrag\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"order.order.desc1\",\n                title: {\n                  text: \"Auftragsbezeichnung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"workprocessNumber\",\n                title: {\n                  text: \"Arbeitsgang\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"workprocess.workprocess.desc1\",\n                title: {\n                  text: \"Arbeitsgangbezeichnung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ],\n            automatic: {\n              type: \"save\",\n              title: {\n                text: \"Kontrolle\",\n                style: {}\n              },\n              duration: 10000\n            }\n          },\n          {\n            id: 11143,\n            type: \"save\"\n          },\n          {\n            id: 11144,\n            type: \"restart\",\n            level: [1113]\n          }\n        ]\n      }',0),
(14,0,'2021-04-02 22:22:36','\0','521_Salden','2021-04-02 22:22:36','521_Salden','{\n        id: 521,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Salden\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Salden-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 5211,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 5212,\n            type: \"httpGetRequest\",\n            list: \"balances\",\n            controllerName: \"secClockworkBalancesInfo\",\n            parameter1Key: \"personNumber\",\n            parameter1Value: \"personNumber\"\n          },\n          {\n            id: 5213,\n            type: \"showOverview\",\n	    list:\"balances\",\n            listedColumns: [\n              {\n                columnName: \"name\",\n                title: {\n                  text: \"Name\",\n                  style: {}\n                }\n              },\n              {\n                columnName: \"value\",\n                title: {\n                  text: \"Wert\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n               {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          }\n\n        ]\n      }',0),
(15,1,'2021-04-02 22:22:53','\0','531_Status NFC','2021-04-06 13:21:30','531_Status NFC','{\n        id: 531,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Status mit NFC\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Status-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 5311,\n            type: \"input\",\n            sources: [\"nfcReader\"],\n            tableField: \"identificationCode\",\n            title: {\n              text: \"Ausweis\",\n              style: {}\n            }\n          },\n          {\n            id: 5312,\n            type: \"calculation\",\n            tableField: \"identificationCode\",\n            calculation:\n              \'fields[\"identificationCode\"].replace(/:/g, \"\").toUpperCase()\',\n            displayCalculation: \'fields[\"identificationCodeDisplay\"]\'\n          },\n          {\n            id: 5313,\n            type: \"httpGetRequest\",\n            tableField: \"person\",\n            controllerName: \"secClockworkLastTimeBookingInfo\",\n            parameter1Key: \"identificationCode\",\n            parameter1Value: \"identificationCode\"\n          },\n          {\n            id: 5314,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"identificationCode\",\n                title: {\n                  text: \"Ausweis\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.number\",\n                title: {\n                  text: \"Personalnr.\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.firstname + person.person.surname\",\n                title: {\n                  text: \"Name\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.bookingCode\",\n                title: {\n                  text: \"Status\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.date\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n               {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          }\n\n        ]\n      }',0),
(16,0,'2021-04-02 22:23:08','\0','411_GehenFG table','2021-04-02 22:23:08','411_GehenFG table','{\n        id: 411,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Gehen mit Fehlgrund\",\n          style: {}\n        },\n        subTitle: {\n          text: \"GehenAW-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 4111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 4112,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"absence\",\n            tableField: \"absenceNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"desc1\",\n            title: {\n              text: \"Fehlgrund\",\n              style: {}\n            },\n            searchable: true\n          },\n          {\n            id: 4113,\n            type: \"constant\",\n            value: \"G\",\n            displayValue: \"Gehen\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 4114,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 4115,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"absenceNumber\",\n                title: {\n                  text: \"Fehlgrund\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 4116,\n            type: \"save\"\n          },\n          {\n            id: 4117,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(17,0,'2021-04-02 22:23:08','\0','411_GehenFG table','2021-04-02 22:23:08','411_GehenFG table','{\n        id: 411,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Gehen mit Fehlgrund\",\n          style: {}\n        },\n        subTitle: {\n          text: \"GehenAW-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 4111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 4112,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"absence\",\n            tableField: \"absenceNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"desc1\",\n            title: {\n              text: \"Fehlgrund\",\n              style: {}\n            },\n            searchable: true\n          },\n          {\n            id: 4113,\n            type: \"constant\",\n            value: \"G\",\n            displayValue: \"Gehen\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 4114,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 4115,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"absenceNumber\",\n                title: {\n                  text: \"Fehlgrund\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 4116,\n            type: \"save\"\n          },\n          {\n            id: 4117,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(18,0,'2021-04-02 22:23:30','\0','331_KommenFG table','2021-04-02 22:23:30','331_KommenFG table','{\n        id: 331,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Kommen mit Fehlgrund\",\n          style: {}\n        },\n        subTitle: {\n          text: \"KommenAW-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 3111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 3112,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"absence\",\n            tableField: \"absenceNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"desc1\",\n                title: {\n                  text: \"Bezeichnung\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"desc1\",\n            title: {\n              text: \"Fehlgrund\",\n              style: {}\n            },\n            searchable: true\n          },\n          {\n            id: 3113,\n            type: \"constant\",\n            value: \"C\",\n            displayValue: \"Kommen\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 3114,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 3115,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"absenceNumber\",\n                title: {\n                  text: \"Fehlgrund\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 3116,\n            type: \"save\"\n          },\n          {\n            id: 3117,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(19,0,'2021-04-02 22:23:45','\0','221_Gehen NFC','2021-04-02 22:23:45','221_Gehen NFC','{\n        id: 221,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"GEHEN mit NFC\",\n          style: {}\n        },\n        subTitle: {\n          text: \"GEHEN\",\n          style: {}\n        },\n        items: [\n          {\n            id: 2211,\n            type: \"input\",\n            sources: [\"nfcReader\"],\n            tableField: \"identificationCode\",\n            title: {\n              text: \"Ausweis\",\n              style: {}\n            }\n          },\n          {\n            id: 2212,\n            type: \"calculation\",\n            tableField: \"identificationCode\",\n            calculation:\n              \'fields[\"identificationCode\"].replace(/:/g, \"\").toUpperCase()\',\n            displayCalculation: \'fields[\"identificationCodeDisplay\"]\'\n          },\n          {\n            id: 2213,\n            type: \"httpGetRequest\",\n            tableField: \"person\",\n            controllerName: \"secClockworkPersonInfo\",\n            parameter1Key: \"identificationCode\",\n            parameter1Value: \"identificationCode\"\n          },\n          {\n            id: 2214,\n            type: \"constant\",\n            value: \"G\",\n            displayValue: \"GEHEN\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 2215,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 2216,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"identificationCode\",\n                title: {\n                  text: \"Ausweis\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.number\",\n                title: {\n                  text: \"Personalnr.\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"person.person.firstname + person.person.surname\",\n                title: {\n                  text: \"Name\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ],\n            automatic: {\n              type: \"save\",\n              title: {\n                text: \"Kontrolle\",\n                style: {}\n              },\n              duration: 5000\n            }\n          },\n          {\n            id: 2217,\n            type: \"save\"\n          },\n          {\n            id: 2218,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(20,0,'2021-04-02 22:23:59','\0','211_Gehen','2021-04-02 22:23:59','211_Gehen','{\n        id: 211,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Gehen\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Gehen-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 2111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 2112,\n            type: \"constant\",\n            value: \"G\",\n            displayValue: \"Gehen\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 2113,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 2114,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 2115,\n            type: \"save\"\n          },\n          {\n            id: 2116,\n            type: \"restart\"\n          }\n        ]\n      }',0),
(21,0,'2021-04-02 22:24:14','\0','111_Kommen','2021-04-02 22:24:14','111_Kommen','{\n        id: 111,\n        type: \"recording\",\n        table: \"time\",\n        title: {\n          text: \"Kommen\",\n          style: {}\n        },\n        subTitle: {\n          text: \"Kommen-Sub\",\n          style: {}\n        },\n        items: [\n          {\n            id: 1111,\n            type: \"input\",\n            sources: [\"fromTable\"],\n            table: \"person\",\n            continueIfOnlyOneItem:true,\n            tableField: \"personNumber\",\n            listedFields: [\n              {\n                fieldName: \"number\",\n                title: {\n                  text: \"Nummer\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"firstname\",\n                title: {\n                  text: \"Vorname\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"surname\",\n                title: {\n                  text: \"Nachname\",\n                  style: {}\n                }\n              }\n            ],\n            hiddenFields: [\n              {\n                fieldName: \"dbId\"\n              }\n            ],\n            valueField: \"number\",\n            displayValueField: \"surname\",\n            title: {\n              text: \"Person\",\n              style: {}\n            }\n          },\n          {\n            id: 1112,\n            type: \"constant\",\n            value: \"C\",\n            displayValue: \"Kommen\",\n            tableField: \"bookingCode\",\n            title: {\n              text: \"Meldung\",\n              style: {}\n            }\n          },\n          {\n            id: 1113,\n            type: \"dateTime\",\n            tableField: \"dateTime\",\n            title: {\n              text: \"Datum/Zeit\",\n              style: {}\n            }\n          },\n          {\n            id: 1114,\n            type: \"showOverview\",\n            listedFields: [\n              {\n                fieldName: \"personNumber\",\n                title: {\n                  text: \"Person\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"bookingCode\",\n                title: {\n                  text: \"Meldung\",\n                  style: {}\n                }\n              },\n              {\n                fieldName: \"dateTime\",\n                title: {\n                  text: \"Datum/Zeit\",\n                  style: {}\n                }\n              }\n            ],\n            buttons: [\n              {\n                type: \"save\",\n                title: {\n                  text: \"speichern\",\n                  style: {}\n                }\n              },\n              {\n                type: \"cancel\",\n                title: {\n                  text: \"Abbrechen\",\n                  style: {}\n                }\n              }\n            ]\n          },\n          {\n            id: 1115,\n            type: \"save\"\n          },\n          {\n            id: 1116,\n            type: \"restart\"\n          }\n        ]\n      }',0);

--
-- Table structure for table `cw_web_app_table`
--

CREATE TABLE `cw_web_app_table` (
  `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,
  `sequence1` longtext DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_web_app_table`
--

INSERT INTO `cw_web_app_table` VALUES
(1,1,'2020-05-25 12:47:18','\0','time','2021-04-02 22:17:05','time','{\n        name: \"time\",\n        fields: [\n          {\n            name: \"personNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"dateTime\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"identificationCode\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"bookingCode\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"absenceNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"gpsCoords\",\n            defaultValue: {}\n          },\n          {\n            name: \"counter\",\n            defaultValue: 0\n          }\n        ]\n      }',0),
(2,1,'2020-05-25 12:47:45','\0','work','2021-04-02 22:16:54','work','{\n        name: \"work\",\n        fields: [\n          {\n            name: \"personNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"dateTime\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"identificationCode\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"bookingCode\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"projectNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"orderNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"orderItemNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"costUnitNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"machineNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"workplaceNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"workprocessNumber\",\n            defaultValue: \"\"\n          },\n          {\n            name: \"gpsCoords\",\n            defaultValue: {}\n          },\n          {\n            name: \"counter\",\n            defaultValue: 0\n          }\n        ]\n      }',0);

--
-- Table structure for table `cw_work_calculation`
--

CREATE TABLE `cw_work_calculation` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  `work_calculation_enum` varchar(255) NOT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKfc43m78twt5fp2crjyju5ax81` (`cost_unit_id`),
  KEY `FK5shsjb2k1knkxcf8c0x3s9jvd` (`machine_id`),
  KEY `FKn2nc2uc3h0g5ml13bmmoqv3i5` (`order_id`),
  KEY `FKcj8fko4d0kqaxmhlldn6bwg2k` (`order_item_id`),
  KEY `FKmu4f68cdhkh59k0hjnmh3a3xc` (`project_id`),
  KEY `FK3cj1o2kde34r4i972149t7c97` (`workplace_id`),
  KEY `FK6h6dong3yjt5nnu38dbqva901` (`workprocess_id`),
  CONSTRAINT `FK3cj1o2kde34r4i972149t7c97` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FK5shsjb2k1knkxcf8c0x3s9jvd` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FK6h6dong3yjt5nnu38dbqva901` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKcj8fko4d0kqaxmhlldn6bwg2k` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FKfc43m78twt5fp2crjyju5ax81` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FKmu4f68cdhkh59k0hjnmh3a3xc` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FKn2nc2uc3h0g5ml13bmmoqv3i5` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_calculation`
--


--
-- Table structure for table `cw_work_calculation_time`
--

CREATE TABLE `cw_work_calculation_time` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `after_first_coming_cost_unit_id` bigint(20) DEFAULT NULL,
  `after_first_coming_machine_id` bigint(20) DEFAULT NULL,
  `after_first_coming_min_time` int(11) NOT NULL,
  `after_first_coming_order_id` bigint(20) DEFAULT NULL,
  `after_first_coming_order_item_id` bigint(20) DEFAULT NULL,
  `after_first_coming_project_id` bigint(20) DEFAULT NULL,
  `after_first_coming_work_calculation_enum` varchar(255) DEFAULT NULL,
  `after_first_coming_workplace_id` bigint(20) DEFAULT NULL,
  `after_first_coming_workprocess_id` bigint(20) DEFAULT NULL,
  `after_further_coming_cost_unit_id` bigint(20) DEFAULT NULL,
  `after_further_coming_machine_id` bigint(20) DEFAULT NULL,
  `after_further_coming_min_time` int(11) NOT NULL,
  `after_further_coming_order_id` bigint(20) DEFAULT NULL,
  `after_further_coming_order_item_id` bigint(20) DEFAULT NULL,
  `after_further_coming_project_id` bigint(20) DEFAULT NULL,
  `after_further_coming_work_calculation_enum` varchar(255) DEFAULT NULL,
  `after_further_coming_workplace_id` bigint(20) DEFAULT NULL,
  `after_further_coming_workprocess_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `description` varchar(255) NOT NULL,
  `last_updated` datetime NOT NULL,
  `name` varchar(255) NOT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKtmuogf28du18j2e1ue4wlg7yg` (`after_first_coming_cost_unit_id`),
  KEY `FKgkqkxv4qniyevc045xtd99jmm` (`after_first_coming_machine_id`),
  KEY `FKn5w3ym2x2ok2frjvadoc7hdmq` (`after_first_coming_order_id`),
  KEY `FKrbyfcurlunq6th0pmd76h1wi5` (`after_first_coming_order_item_id`),
  KEY `FK8m4eewxpgif708x52syal4kbe` (`after_first_coming_project_id`),
  KEY `FKg87ukfbxymg3louhkruyw290i` (`after_first_coming_workplace_id`),
  KEY `FKews42nemxl9sjswtjyjckai1u` (`after_first_coming_workprocess_id`),
  KEY `FKp5ac3h422iqvb343bldfaxblx` (`after_further_coming_cost_unit_id`),
  KEY `FKg44m65a3ntf5k9i048pia5hwx` (`after_further_coming_machine_id`),
  KEY `FKky5m3rpd9d7lr13pvjiqmnntv` (`after_further_coming_order_id`),
  KEY `FK2205ni2l1c1n8km103wjg2jnu` (`after_further_coming_order_item_id`),
  KEY `FKo148y56hyilqhvcx1h613nbvv` (`after_further_coming_project_id`),
  KEY `FKq94qyu1f4q2qtmw9ychxam0la` (`after_further_coming_workplace_id`),
  KEY `FK37ibtdcarko3wy6lguv5jdxph` (`after_further_coming_workprocess_id`),
  CONSTRAINT `FK2205ni2l1c1n8km103wjg2jnu` FOREIGN KEY (`after_further_coming_order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FK37ibtdcarko3wy6lguv5jdxph` FOREIGN KEY (`after_further_coming_workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FK8m4eewxpgif708x52syal4kbe` FOREIGN KEY (`after_first_coming_project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FKews42nemxl9sjswtjyjckai1u` FOREIGN KEY (`after_first_coming_workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKg44m65a3ntf5k9i048pia5hwx` FOREIGN KEY (`after_further_coming_machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FKg87ukfbxymg3louhkruyw290i` FOREIGN KEY (`after_first_coming_workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKgkqkxv4qniyevc045xtd99jmm` FOREIGN KEY (`after_first_coming_machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FKky5m3rpd9d7lr13pvjiqmnntv` FOREIGN KEY (`after_further_coming_order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKn5w3ym2x2ok2frjvadoc7hdmq` FOREIGN KEY (`after_first_coming_order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKo148y56hyilqhvcx1h613nbvv` FOREIGN KEY (`after_further_coming_project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FKp5ac3h422iqvb343bldfaxblx` FOREIGN KEY (`after_further_coming_cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FKq94qyu1f4q2qtmw9ychxam0la` FOREIGN KEY (`after_further_coming_workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKrbyfcurlunq6th0pmd76h1wi5` FOREIGN KEY (`after_first_coming_order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FKtmuogf28du18j2e1ue4wlg7yg` FOREIGN KEY (`after_first_coming_cost_unit_id`) REFERENCES `cw_cost_unit` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_calculation_time`
--


--
-- Table structure for table `cw_work_calculation_time_2_absence`
--

CREATE TABLE `cw_work_calculation_time_2_absence` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `absence_id` bigint(20) DEFAULT NULL,
  `after_coming_cost_unit_id` bigint(20) DEFAULT NULL,
  `after_coming_machine_id` bigint(20) DEFAULT NULL,
  `after_coming_min_time` int(11) NOT NULL,
  `after_coming_order_id` bigint(20) DEFAULT NULL,
  `after_coming_order_item_id` bigint(20) DEFAULT NULL,
  `after_coming_project_id` bigint(20) DEFAULT NULL,
  `after_coming_work_calculation_enum` varchar(255) DEFAULT NULL,
  `after_coming_workplace_id` bigint(20) DEFAULT NULL,
  `after_coming_workprocess_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `during_absence_cost_unit_id` bigint(20) DEFAULT NULL,
  `during_absence_machine_id` bigint(20) DEFAULT NULL,
  `during_absence_min_time` int(11) NOT NULL,
  `during_absence_order_id` bigint(20) DEFAULT NULL,
  `during_absence_order_item_id` bigint(20) DEFAULT NULL,
  `during_absence_project_id` bigint(20) DEFAULT NULL,
  `during_absence_work_calculation_enum` varchar(255) DEFAULT NULL,
  `during_absence_workplace_id` bigint(20) DEFAULT NULL,
  `during_absence_workprocess_id` bigint(20) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  `work_calculation_time_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK6aasegw406beeecx6ccoo4n7n` (`absence_id`),
  KEY `FK5dwoqult6k4vopmj11m3tvr24` (`after_coming_cost_unit_id`),
  KEY `FKmexj6mq1lap1tbo5d6yjl2e4g` (`after_coming_machine_id`),
  KEY `FKa2ldt228h7x79su0f08sl6brq` (`after_coming_order_id`),
  KEY `FK523x7bm5g82s0hxfc6ejpfthp` (`after_coming_order_item_id`),
  KEY `FKm3qn3q34xerod1mymdieuiqft` (`after_coming_project_id`),
  KEY `FKp8u0xurervdh5r8iq5vp16k1e` (`after_coming_workplace_id`),
  KEY `FKgclwe7qkp9kd3p8h5nm6a8n4m` (`after_coming_workprocess_id`),
  KEY `FKq9uteclvb9xtwchq3wmd1kto9` (`during_absence_cost_unit_id`),
  KEY `FKmtbxl5ldvf8ip2n7frwuj965r` (`during_absence_machine_id`),
  KEY `FK706duv2qnh3h4inqd0qu99f1o` (`during_absence_order_id`),
  KEY `FK5i7jh7tf3juhru05nihvk4ryf` (`during_absence_order_item_id`),
  KEY `FKgmv31frk122ar9bsxiwnr8ktg` (`during_absence_project_id`),
  KEY `FK9dophgxc7hiqbwhojkinyri92` (`during_absence_workplace_id`),
  KEY `FKbafllkqd4nbsmuyq4a24xiqt3` (`during_absence_workprocess_id`),
  KEY `FKkp7p1otivruyapsr3lteiigpo` (`work_calculation_time_id`),
  CONSTRAINT `FK523x7bm5g82s0hxfc6ejpfthp` FOREIGN KEY (`after_coming_order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FK5dwoqult6k4vopmj11m3tvr24` FOREIGN KEY (`after_coming_cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FK5i7jh7tf3juhru05nihvk4ryf` FOREIGN KEY (`during_absence_order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FK6aasegw406beeecx6ccoo4n7n` FOREIGN KEY (`absence_id`) REFERENCES `cw_absence` (`id`),
  CONSTRAINT `FK706duv2qnh3h4inqd0qu99f1o` FOREIGN KEY (`during_absence_order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FK9dophgxc7hiqbwhojkinyri92` FOREIGN KEY (`during_absence_workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKa2ldt228h7x79su0f08sl6brq` FOREIGN KEY (`after_coming_order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKbafllkqd4nbsmuyq4a24xiqt3` FOREIGN KEY (`during_absence_workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKgclwe7qkp9kd3p8h5nm6a8n4m` FOREIGN KEY (`after_coming_workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKgmv31frk122ar9bsxiwnr8ktg` FOREIGN KEY (`during_absence_project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FKkp7p1otivruyapsr3lteiigpo` FOREIGN KEY (`work_calculation_time_id`) REFERENCES `cw_work_calculation_time` (`id`),
  CONSTRAINT `FKm3qn3q34xerod1mymdieuiqft` FOREIGN KEY (`after_coming_project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FKmexj6mq1lap1tbo5d6yjl2e4g` FOREIGN KEY (`after_coming_machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FKmtbxl5ldvf8ip2n7frwuj965r` FOREIGN KEY (`during_absence_machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FKp8u0xurervdh5r8iq5vp16k1e` FOREIGN KEY (`after_coming_workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKq9uteclvb9xtwchq3wmd1kto9` FOREIGN KEY (`during_absence_cost_unit_id`) REFERENCES `cw_cost_unit` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_calculation_time_2_absence`
--


--
-- Table structure for table `cw_work_combination`
--

CREATE TABLE `cw_work_combination` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `description2` varchar(255) DEFAULT NULL,
  `description3` varchar(255) DEFAULT NULL,
  `description4` varchar(255) DEFAULT NULL,
  `description5` varchar(255) DEFAULT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `person_id` bigint(20) DEFAULT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `work_combination_type_id` bigint(20) DEFAULT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  `work_combination_category_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKruo4g57j7et3t2kkuq9hertyr` (`cost_unit_id`),
  KEY `FK2ceq7uvnjym03g1kly9k9fgt7` (`machine_id`),
  KEY `FKquknsgngqa3kphsa5cpa09jwq` (`order_id`),
  KEY `FKakhhkuel88w40ilexnmwf4k2g` (`order_item_id`),
  KEY `FKakqpdod4t0fxakyrepthvk7ag` (`person_id`),
  KEY `FK1twr8mo7eq1o62m2ccbg256re` (`project_id`),
  KEY `FKhmr5o6plpqcvrv10q0ujwk80v` (`workplace_id`),
  KEY `FK7pgcqp6krsi5i2xa5h0vhdj88` (`workprocess_id`),
  KEY `query1_idx` (`work_combination_type_id`,`person_id`,`description`,`description2`,`description3`),
  KEY `FK1wa3t9id8brl3qtytgocbyyj3` (`work_combination_category_id`),
  CONSTRAINT `FK1twr8mo7eq1o62m2ccbg256re` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FK1wa3t9id8brl3qtytgocbyyj3` FOREIGN KEY (`work_combination_category_id`) REFERENCES `cw_work_combination_category` (`id`),
  CONSTRAINT `FK2ceq7uvnjym03g1kly9k9fgt7` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FK7pgcqp6krsi5i2xa5h0vhdj88` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FK82hx4g4fxb3n1dtmanfbf4wlp` FOREIGN KEY (`work_combination_type_id`) REFERENCES `cw_work_combination_type` (`id`),
  CONSTRAINT `FKakhhkuel88w40ilexnmwf4k2g` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FKakqpdod4t0fxakyrepthvk7ag` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKhmr5o6plpqcvrv10q0ujwk80v` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKquknsgngqa3kphsa5cpa09jwq` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKruo4g57j7et3t2kkuq9hertyr` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_combination`
--


--
-- Table structure for table `cw_work_combination_category`
--

CREATE TABLE `cw_work_combination_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) NOT NULL,
  `description_en` 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_work_combination_category`
--


--
-- Table structure for table `cw_work_combination_cw_person`
--

CREATE TABLE `cw_work_combination_cw_person` (
  `work_combination_favorites_id` bigint(20) NOT NULL,
  `person_id` bigint(20) DEFAULT NULL,
  KEY `FKkmwdura8q4ajydb4s8clyoipw` (`person_id`),
  KEY `FKlt2eii9vg38fq8ifb724havpb` (`work_combination_favorites_id`),
  CONSTRAINT `FKkmwdura8q4ajydb4s8clyoipw` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKlt2eii9vg38fq8ifb724havpb` FOREIGN KEY (`work_combination_favorites_id`) REFERENCES `cw_work_combination` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_combination_cw_person`
--


--
-- Table structure for table `cw_work_combination_type`
--

CREATE TABLE `cw_work_combination_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `cost_unit_is_obligatory` bit(1) 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,
  `machine_is_obligatory` bit(1) NOT NULL,
  `name` varchar(255) NOT NULL,
  `order_is_obligatory` bit(1) NOT NULL,
  `order_item_is_obligatory` bit(1) NOT NULL,
  `project_is_obligatory` bit(1) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `workplace_is_obligatory` bit(1) NOT NULL,
  `workprocess_is_obligatory` bit(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_combination_type`
--


--
-- Table structure for table `cw_work_period`
--

CREATE TABLE `cw_work_period` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `end_date` datetime NOT NULL,
  `last_updated` datetime NOT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `person_id` bigint(20) NOT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `start_date` datetime NOT NULL,
  `update_counter` int(11) NOT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  `generated` bit(1) NOT NULL,
  `extern_id` bigint(20) DEFAULT NULL,
  `homeoffice` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK7ibu2fpc0gm3d3xu38b5p6t5k` (`cost_unit_id`),
  KEY `FKlo4wdtbhurdk00fliqtbbpbcc` (`machine_id`),
  KEY `FKe5hpwlho9b7yiqgly0ehw7kb4` (`order_id`),
  KEY `FKsggmqohhpra40ut5e579e929n` (`order_item_id`),
  KEY `FKfedbyqprbkwxrr959qnrfdehh` (`person_id`),
  KEY `FK2tudnpnln5v2ppc8xgtvbnfvs` (`project_id`),
  KEY `FK9im86txwepffsuipsglb5bpe3` (`workplace_id`),
  KEY `FKs178nnixif8xy7pvfu6rk0lg7` (`workprocess_id`),
  KEY `query1_idx` (`person_id`,`start_date`,`end_date`,`generated`,`deleted`),
  CONSTRAINT `FK2tudnpnln5v2ppc8xgtvbnfvs` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FK7ibu2fpc0gm3d3xu38b5p6t5k` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FK9im86txwepffsuipsglb5bpe3` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKe5hpwlho9b7yiqgly0ehw7kb4` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKfedbyqprbkwxrr959qnrfdehh` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKlo4wdtbhurdk00fliqtbbpbcc` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FKs178nnixif8xy7pvfu6rk0lg7` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKsggmqohhpra40ut5e579e929n` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_period`
--


--
-- Table structure for table `cw_work_time_manual`
--

CREATE TABLE `cw_work_time_manual` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `person_id` bigint(20) NOT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  `generated` bit(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKpm5rbbw06nf38hwu8jf5kdcy4` (`cost_unit_id`),
  KEY `FKtbh944lgmb8fohpb2iyj726dv` (`machine_id`),
  KEY `FK2ey8b4url7narjnnve2ikr7y` (`order_id`),
  KEY `FK8jttfiama0y6y67l21vtyly2l` (`order_item_id`),
  KEY `FKdn5mamvboaof79qkrlqey26t6` (`person_id`),
  KEY `FKnyflrd4xkid2s34jlavmiux12` (`project_id`),
  KEY `FKi6fb9lah7fhimg7pbf1myhgdq` (`workplace_id`),
  KEY `FKa7ydowutim5cxd47utm8usfu2` (`workprocess_id`),
  CONSTRAINT `FK2ey8b4url7narjnnve2ikr7y` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FK8jttfiama0y6y67l21vtyly2l` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FKa7ydowutim5cxd47utm8usfu2` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKdn5mamvboaof79qkrlqey26t6` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKi6fb9lah7fhimg7pbf1myhgdq` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKnyflrd4xkid2s34jlavmiux12` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FKpm5rbbw06nf38hwu8jf5kdcy4` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FKtbh944lgmb8fohpb2iyj726dv` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_time_manual`
--


--
-- Table structure for table `cw_work_time_manual_2_detail`
--

CREATE TABLE `cw_work_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,
  `work_time_manual_id` bigint(20) NOT NULL,
  `work_time_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK9hvq5r3u4r0imquc7h2rtf5fh` (`work_time_manual_id`),
  KEY `FK2i1k8r8o833amwg20sbpr0w4h` (`work_time_type_id`),
  CONSTRAINT `FK2i1k8r8o833amwg20sbpr0w4h` FOREIGN KEY (`work_time_type_id`) REFERENCES `cw_work_time_type` (`id`),
  CONSTRAINT `FK9hvq5r3u4r0imquc7h2rtf5fh` FOREIGN KEY (`work_time_manual_id`) REFERENCES `cw_work_time_manual` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_time_manual_2_detail`
--


--
-- Table structure for table `cw_work_time_model`
--

CREATE TABLE `cw_work_time_model` (
  `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,
  `name` varchar(255) 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_work_time_model`
--


--
-- Table structure for table `cw_work_time_plan`
--

CREATE TABLE `cw_work_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` varchar(255) NOT NULL,
  `last_updated` datetime NOT NULL,
  `name` varchar(255) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `work_time_model_friday_id` bigint(20) DEFAULT NULL,
  `work_time_model_monday_id` bigint(20) DEFAULT NULL,
  `work_time_model_saturday_id` bigint(20) DEFAULT NULL,
  `work_time_model_sunday_id` bigint(20) DEFAULT NULL,
  `work_time_model_thursday_id` bigint(20) DEFAULT NULL,
  `work_time_model_tuesday_id` bigint(20) DEFAULT NULL,
  `work_time_model_wednesday_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKiq8wdvgme93qvw0vq79x4j4do` (`work_time_model_friday_id`),
  KEY `FKgsflot5elqy5nwyghxvup5xmt` (`work_time_model_monday_id`),
  KEY `FKowknxxqjpwu4rvain2uef5dx4` (`work_time_model_saturday_id`),
  KEY `FKffu5kxtpcded4wvx86ub82alj` (`work_time_model_sunday_id`),
  KEY `FKnhipv32dbvc83co7me86fd7tb` (`work_time_model_thursday_id`),
  KEY `FKavfm4tyjb0lr1mdlrmv5o2cgx` (`work_time_model_tuesday_id`),
  KEY `FKrumnufs1n4wyy6hlcy3s7ghxn` (`work_time_model_wednesday_id`),
  CONSTRAINT `FKavfm4tyjb0lr1mdlrmv5o2cgx` FOREIGN KEY (`work_time_model_tuesday_id`) REFERENCES `cw_work_time_model` (`id`),
  CONSTRAINT `FKffu5kxtpcded4wvx86ub82alj` FOREIGN KEY (`work_time_model_sunday_id`) REFERENCES `cw_work_time_model` (`id`),
  CONSTRAINT `FKgsflot5elqy5nwyghxvup5xmt` FOREIGN KEY (`work_time_model_monday_id`) REFERENCES `cw_work_time_model` (`id`),
  CONSTRAINT `FKiq8wdvgme93qvw0vq79x4j4do` FOREIGN KEY (`work_time_model_friday_id`) REFERENCES `cw_work_time_model` (`id`),
  CONSTRAINT `FKnhipv32dbvc83co7me86fd7tb` FOREIGN KEY (`work_time_model_thursday_id`) REFERENCES `cw_work_time_model` (`id`),
  CONSTRAINT `FKowknxxqjpwu4rvain2uef5dx4` FOREIGN KEY (`work_time_model_saturday_id`) REFERENCES `cw_work_time_model` (`id`),
  CONSTRAINT `FKrumnufs1n4wyy6hlcy3s7ghxn` FOREIGN KEY (`work_time_model_wednesday_id`) REFERENCES `cw_work_time_model` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_time_plan`
--


--
-- Table structure for table `cw_work_time_type`
--

CREATE TABLE `cw_work_time_type` (
  `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,
  `number` varchar(255) NOT NULL,
  `time_format_enum` varchar(255) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `number_idx` (`number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_time_type`
--


--
-- Table structure for table `cw_work_time_type_data`
--

CREATE TABLE `cw_work_time_type_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `booking_id` bigint(20) DEFAULT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `date` datetime NOT NULL,
  `day_value` double NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `person_id` bigint(20) NOT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `work_period_id` bigint(20) DEFAULT NULL,
  `work_time_type_id` bigint(20) NOT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  `work_time_manual_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKay5x052254du3gop28b4gqywp` (`booking_id`),
  KEY `FKkbonqsf7vyfap12o94eclv1my` (`cost_unit_id`),
  KEY `FK5x389xuhoqwoipeueo5hngmki` (`machine_id`),
  KEY `FK47knixlx6fhipmodh7p0j8ogs` (`order_id`),
  KEY `FKst8a29lws3j1g5934o3f1x5pq` (`order_item_id`),
  KEY `FK271wrldyauhdxckuqi0v2o14e` (`project_id`),
  KEY `FKjsobgf61wurcfuae2g062srmg` (`work_period_id`),
  KEY `FKa837ft8dfvmmlc7j0jidcdekq` (`work_time_type_id`),
  KEY `FK1xsi64n6xy5gpb67qqhtmn528` (`workplace_id`),
  KEY `FK7cbqhuou5th1t4eyk5e7w92dg` (`workprocess_id`),
  KEY `query1_idx` (`person_id`,`work_time_type_id`,`date`),
  KEY `FKssv5sxovssxylo5f1ntthanai` (`work_time_manual_id`),
  CONSTRAINT `FK1xsi64n6xy5gpb67qqhtmn528` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FK271wrldyauhdxckuqi0v2o14e` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FK47knixlx6fhipmodh7p0j8ogs` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FK5j86tk24dmmi24th3cueeyk8q` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FK5x389xuhoqwoipeueo5hngmki` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FK7cbqhuou5th1t4eyk5e7w92dg` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKa837ft8dfvmmlc7j0jidcdekq` FOREIGN KEY (`work_time_type_id`) REFERENCES `cw_work_time_type` (`id`),
  CONSTRAINT `FKay5x052254du3gop28b4gqywp` FOREIGN KEY (`booking_id`) REFERENCES `cw_booking` (`id`),
  CONSTRAINT `FKjsobgf61wurcfuae2g062srmg` FOREIGN KEY (`work_period_id`) REFERENCES `cw_work_period` (`id`),
  CONSTRAINT `FKkbonqsf7vyfap12o94eclv1my` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FKssv5sxovssxylo5f1ntthanai` FOREIGN KEY (`work_time_manual_id`) REFERENCES `cw_work_time_manual` (`id`),
  CONSTRAINT `FKst8a29lws3j1g5934o3f1x5pq` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_time_type_data`
--


--
-- Table structure for table `cw_work_time_type_data_rewind`
--

CREATE TABLE `cw_work_time_type_data_rewind` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `booking_id` bigint(20) DEFAULT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `person_id` bigint(20) NOT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `value1` double NOT NULL,
  `value2` double NOT NULL,
  `value3` double NOT NULL,
  `value4` double NOT NULL,
  `value5` double NOT NULL,
  `work_period_id` bigint(20) DEFAULT NULL,
  `work_time_manual_id` bigint(20) DEFAULT NULL,
  `work_time_type_id` bigint(20) NOT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  `extern_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKgc4l2wbu17yiycqiskh42k8ym` (`booking_id`),
  KEY `FKn16w4h6u1keku983ohuxj2scn` (`cost_unit_id`),
  KEY `FKt0u8tg7mms0jsqqmuer6ui5p5` (`machine_id`),
  KEY `FKjvw7jh3o8ketkddjwkdtsvfrv` (`order_id`),
  KEY `FK3c1q048ct1a6uk4js5isaaw2f` (`order_item_id`),
  KEY `FKa829nactw9mkpvijboxhwvr5u` (`person_id`),
  KEY `FK1iteefwbjrlnj7eximejiakd6` (`project_id`),
  KEY `FKkxkni0ocy2jq283jg8er8bq0x` (`work_period_id`),
  KEY `FKfk997lole79xt9i1rgh558ece` (`work_time_manual_id`),
  KEY `FKrpfsbpyikk0b15am2n1wy0fbi` (`work_time_type_id`),
  KEY `FKfgm8hd5op8avig5umbhl07pgh` (`workplace_id`),
  KEY `FKi2jf468wb7jp1cnfa4yicbwo2` (`workprocess_id`),
  CONSTRAINT `FK1iteefwbjrlnj7eximejiakd6` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FK3c1q048ct1a6uk4js5isaaw2f` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FKa829nactw9mkpvijboxhwvr5u` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKfgm8hd5op8avig5umbhl07pgh` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKfk997lole79xt9i1rgh558ece` FOREIGN KEY (`work_time_manual_id`) REFERENCES `cw_work_time_manual` (`id`),
  CONSTRAINT `FKgc4l2wbu17yiycqiskh42k8ym` FOREIGN KEY (`booking_id`) REFERENCES `cw_booking` (`id`),
  CONSTRAINT `FKi2jf468wb7jp1cnfa4yicbwo2` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKjvw7jh3o8ketkddjwkdtsvfrv` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKkxkni0ocy2jq283jg8er8bq0x` FOREIGN KEY (`work_period_id`) REFERENCES `cw_work_period` (`id`),
  CONSTRAINT `FKn16w4h6u1keku983ohuxj2scn` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FKrpfsbpyikk0b15am2n1wy0fbi` FOREIGN KEY (`work_time_type_id`) REFERENCES `cw_work_time_type` (`id`),
  CONSTRAINT `FKt0u8tg7mms0jsqqmuer6ui5p5` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_work_time_type_data_rewind`
--


--
-- Table structure for table `cw_workflow`
--

CREATE TABLE `cw_workflow` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `current_workflow2process_id` bigint(20) DEFAULT NULL,
  `date` datetime NOT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `first_workflow2process_id` bigint(20) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `superior_workflow_id` bigint(20) DEFAULT NULL,
  `workflow_type_id` bigint(20) NOT NULL,
  `class` varchar(255) NOT NULL,
  `person_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKe2vc9tnis4706dyj8x6auepkx` (`current_workflow2process_id`),
  KEY `FKoqbl73pamvn5bwsfqqgq9deb4` (`first_workflow2process_id`),
  KEY `FKhnkh2oylcmnfrk7b3tdxyhkk7` (`superior_workflow_id`),
  KEY `FKlmf5t900l5k3yg29ntos5guxn` (`workflow_type_id`),
  KEY `FKn7w7wl4ahfvpqephucqf4i6c1` (`person_id`),
  CONSTRAINT `FKe2vc9tnis4706dyj8x6auepkx` FOREIGN KEY (`current_workflow2process_id`) REFERENCES `cw_workflow_2_process` (`id`),
  CONSTRAINT `FKhnkh2oylcmnfrk7b3tdxyhkk7` FOREIGN KEY (`superior_workflow_id`) REFERENCES `cw_workflow` (`id`),
  CONSTRAINT `FKlmf5t900l5k3yg29ntos5guxn` FOREIGN KEY (`workflow_type_id`) REFERENCES `cw_workflow_type` (`id`),
  CONSTRAINT `FKn7w7wl4ahfvpqephucqf4i6c1` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKoqbl73pamvn5bwsfqqgq9deb4` FOREIGN KEY (`first_workflow2process_id`) REFERENCES `cw_workflow_2_process` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow`
--


--
-- Table structure for table `cw_workflow_2_detail`
--

CREATE TABLE `cw_workflow_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,
  `value` double NOT NULL,
  `workflow_id` bigint(20) NOT NULL,
  `workflow_type2detail_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKgq3qvodwbuepmyavsopjy89ce` (`workflow_id`),
  KEY `FK31g1t8ybmh2vt9hxh411sguw0` (`workflow_type2detail_id`),
  CONSTRAINT `FK31g1t8ybmh2vt9hxh411sguw0` FOREIGN KEY (`workflow_type2detail_id`) REFERENCES `cw_workflow_type_2_detail` (`id`),
  CONSTRAINT `FKgq3qvodwbuepmyavsopjy89ce` FOREIGN KEY (`workflow_id`) REFERENCES `cw_workflow` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_2_detail`
--


--
-- Table structure for table `cw_workflow_2_process`
--

CREATE TABLE `cw_workflow_2_process` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  `workflow_id` bigint(20) NOT NULL,
  `workflow_enum` varchar(255) NOT NULL,
  `workflow_type2action_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKoyumyg2n3w8xrlf0pw05xocr3` (`user_id`),
  KEY `FKjq4knqpnfy0vcgjshgh6kn1pc` (`workflow_id`),
  KEY `FKcqh077leruhya7yhqsxl14dy9` (`workflow_type2action_id`),
  CONSTRAINT `FKcqh077leruhya7yhqsxl14dy9` FOREIGN KEY (`workflow_type2action_id`) REFERENCES `cw_workflow_type_2_action` (`id`),
  CONSTRAINT `FKjq4knqpnfy0vcgjshgh6kn1pc` FOREIGN KEY (`workflow_id`) REFERENCES `cw_workflow` (`id`),
  CONSTRAINT `FKoyumyg2n3w8xrlf0pw05xocr3` FOREIGN KEY (`user_id`) REFERENCES `cw_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_2_process`
--


--
-- Table structure for table `cw_workflow_2_process_2_detail`
--

CREATE TABLE `cw_workflow_2_process_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,
  `workflow2detail_id` bigint(20) NOT NULL,
  `workflow2process_id` bigint(20) NOT NULL,
  `class` varchar(255) NOT NULL,
  `time_time_type_id` bigint(20) DEFAULT NULL,
  `time_transfer_enum` varchar(255) DEFAULT NULL,
  `value` double DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKn17mqaesog2d89ivy1folek8k` (`workflow2detail_id`),
  KEY `FKmd2ce6xd0i5puto9juh2swqdl` (`workflow2process_id`),
  KEY `FK2dtslhfihy2r6x5i77oj5p2pi` (`time_time_type_id`),
  CONSTRAINT `FK2dtslhfihy2r6x5i77oj5p2pi` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FKmd2ce6xd0i5puto9juh2swqdl` FOREIGN KEY (`workflow2process_id`) REFERENCES `cw_workflow_2_process` (`id`),
  CONSTRAINT `FKn17mqaesog2d89ivy1folek8k` FOREIGN KEY (`workflow2detail_id`) REFERENCES `cw_workflow_2_detail` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_2_process_2_detail`
--


--
-- Table structure for table `cw_workflow_email`
--

CREATE TABLE `cw_workflow_email` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `body` longtext DEFAULT NULL,
  `carbon_copy` varchar(255) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) NOT NULL,
  `last_updated` datetime NOT NULL,
  `recipient` varchar(255) DEFAULT NULL,
  `recipients_json` longtext DEFAULT NULL,
  `sender` varchar(255) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  `workflow_type_enum` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKp11mp63qhyor5xv053oscjkr6` (`user_id`),
  CONSTRAINT `FKp11mp63qhyor5xv053oscjkr6` FOREIGN KEY (`user_id`) REFERENCES `cw_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_email`
--


--
-- Table structure for table `cw_workflow_type`
--

CREATE TABLE `cw_workflow_type` (
  `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,
  `show_only_when_calculated` bit(1) NOT NULL,
  `update_counter` int(11) NOT NULL,
  `workflow_type_category_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK5fj02wqn240gneibyri1n4182` (`workflow_type_category_id`),
  CONSTRAINT `FK5fj02wqn240gneibyri1n4182` FOREIGN KEY (`workflow_type_category_id`) REFERENCES `cw_workflow_type_category` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_type`
--


--
-- Table structure for table `cw_workflow_type_2_action`
--

CREATE TABLE `cw_workflow_type_2_action` (
  `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,
  `execute_script_id` bigint(20) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `name` varchar(255) NOT NULL,
  `proposal_script_id` bigint(20) DEFAULT NULL,
  `workflow_action_enum` varchar(255) NOT NULL,
  `workflow_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKmugcvku8pr5ynnws0diyk6rbx` (`execute_script_id`),
  KEY `FK3kplbxmjlhrkw021r4ylvmkw3` (`proposal_script_id`),
  KEY `FKelo10wnmj0r6516ycej4n3t9e` (`workflow_type_id`),
  CONSTRAINT `FK3kplbxmjlhrkw021r4ylvmkw3` FOREIGN KEY (`proposal_script_id`) REFERENCES `cw_script` (`id`),
  CONSTRAINT `FKelo10wnmj0r6516ycej4n3t9e` FOREIGN KEY (`workflow_type_id`) REFERENCES `cw_workflow_type` (`id`),
  CONSTRAINT `FKmugcvku8pr5ynnws0diyk6rbx` FOREIGN KEY (`execute_script_id`) REFERENCES `cw_script` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_type_2_action`
--


--
-- Table structure for table `cw_workflow_type_2_action_2_detail`
--

CREATE TABLE `cw_workflow_type_2_action_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,
  `workflow_type2action_id` bigint(20) NOT NULL,
  `workflow_type2detail_id` bigint(20) NOT NULL,
  `class` varchar(255) NOT NULL,
  `time_time_type_id` bigint(20) DEFAULT NULL,
  `time_transfer_enum` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKde863k9w1cgrrfcuvkotgbt1r` (`workflow_type2action_id`),
  KEY `FK6nafjosyoef3a5r5uf4grwaen` (`workflow_type2detail_id`),
  KEY `FK3n3hrjt1ns176by768fdf3mej` (`time_time_type_id`),
  CONSTRAINT `FK3n3hrjt1ns176by768fdf3mej` FOREIGN KEY (`time_time_type_id`) REFERENCES `cw_time_time_type` (`id`),
  CONSTRAINT `FK6nafjosyoef3a5r5uf4grwaen` FOREIGN KEY (`workflow_type2detail_id`) REFERENCES `cw_workflow_type_2_detail` (`id`),
  CONSTRAINT `FKde863k9w1cgrrfcuvkotgbt1r` FOREIGN KEY (`workflow_type2action_id`) REFERENCES `cw_workflow_type_2_action` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_type_2_action_2_detail`
--


--
-- Table structure for table `cw_workflow_type_2_detail`
--

CREATE TABLE `cw_workflow_type_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,
  `text` varchar(255) DEFAULT NULL,
  `time_format_enum` varchar(255) NOT NULL,
  `workflow_type_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKr34os9m9gxoghissywibkrm7v` (`workflow_type_id`),
  CONSTRAINT `FKr34os9m9gxoghissywibkrm7v` FOREIGN KEY (`workflow_type_id`) REFERENCES `cw_workflow_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_type_2_detail`
--


--
-- Table structure for table `cw_workflow_type_2_email`
--

CREATE TABLE `cw_workflow_type_2_email` (
  `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,
  `workflow_enum` varchar(255) NOT NULL,
  `workflow_type_id` bigint(20) NOT NULL,
  `workflow_type2email_enum` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKscwkd9lccn03docqql1dk7l0h` (`workflow_type_id`),
  CONSTRAINT `FKscwkd9lccn03docqql1dk7l0h` FOREIGN KEY (`workflow_type_id`) REFERENCES `cw_workflow_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workflow_type_2_email`
--


--
-- Table structure for table `cw_workflow_type_category`
--

CREATE TABLE `cw_workflow_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` 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_workflow_type_category`
--


--
-- Table structure for table `cw_working_group`
--

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

--
-- Dumping data for table `cw_working_group`
--


--
-- Table structure for table `cw_working_group_2_person`
--

CREATE TABLE `cw_working_group_2_person` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `person_id` bigint(20) NOT NULL,
  `working_group_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKb8pudpo1fuubt402ww7y0917q` (`person_id`),
  KEY `FKknmcu3qm9qvcepkkw4yknml1s` (`working_group_id`),
  CONSTRAINT `FKb8pudpo1fuubt402ww7y0917q` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKknmcu3qm9qvcepkkw4yknml1s` FOREIGN KEY (`working_group_id`) REFERENCES `cw_working_group` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_working_group_2_person`
--


--
-- Table structure for table `cw_workplace`
--

CREATE TABLE `cw_workplace` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `color_id` bigint(20) DEFAULT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `description2` varchar(255) DEFAULT NULL,
  `description3` varchar(255) DEFAULT NULL,
  `description4` varchar(255) DEFAULT NULL,
  `description5` varchar(255) DEFAULT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `mobile_client` bit(1) NOT NULL,
  `number` varchar(255) NOT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `update_counter` int(11) NOT NULL,
  `workplace_category_id` bigint(20) NOT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_1ntstpb31yl3jbupwp7ck6t7w` (`number`),
  KEY `FK2njuf163geqk0s4x5dosdgekw` (`color_id`),
  KEY `FK3h3su6ynbg3j8rn8psrbjghe1` (`cost_unit_id`),
  KEY `FKdexf8sh10bwp9v8igv5nxvq9l` (`machine_id`),
  KEY `FKjeoworct2v1u7i1g3qvi2vlcf` (`order_id`),
  KEY `FKpyt8qx4l51vqqfqkvyobi5w06` (`order_item_id`),
  KEY `FKse5atuuprntw15gs510vkf85u` (`project_id`),
  KEY `FKd9366krl7ywhfkodmg0ytdo3q` (`workplace_category_id`),
  KEY `FK4dxsvurvn3tqj9784sa4l75rj` (`workprocess_id`),
  CONSTRAINT `FK2njuf163geqk0s4x5dosdgekw` FOREIGN KEY (`color_id`) REFERENCES `cw_color` (`id`),
  CONSTRAINT `FK3h3su6ynbg3j8rn8psrbjghe1` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`),
  CONSTRAINT `FK4dxsvurvn3tqj9784sa4l75rj` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKd9366krl7ywhfkodmg0ytdo3q` FOREIGN KEY (`workplace_category_id`) REFERENCES `cw_workplace_category` (`id`),
  CONSTRAINT `FKdexf8sh10bwp9v8igv5nxvq9l` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FKjeoworct2v1u7i1g3qvi2vlcf` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKpyt8qx4l51vqqfqkvyobi5w06` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FKse5atuuprntw15gs510vkf85u` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workplace`
--


--
-- Table structure for table `cw_workplace_2_additional_data`
--

CREATE TABLE `cw_workplace_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,
  `value` varchar(255) DEFAULT NULL,
  `workplace_id` bigint(20) NOT NULL,
  `workplace_additional_data_id` bigint(20) NOT NULL,
  `info_value` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKkns0v3hj36ey7ulvjla2l62i3` (`workplace_additional_data_id`),
  KEY `query1_idx` (`workplace_id`,`workplace_additional_data_id`),
  CONSTRAINT `FKeistb5pogps2b7kjc2nayujy` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKkns0v3hj36ey7ulvjla2l62i3` FOREIGN KEY (`workplace_additional_data_id`) REFERENCES `cw_additional_data` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workplace_2_additional_data`
--


--
-- Table structure for table `cw_workplace_category`
--

CREATE TABLE `cw_workplace_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) NOT NULL,
  `description_en` 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_workplace_category`
--


--
-- Table structure for table `cw_workprocess`
--

CREATE TABLE `cw_workprocess` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `date_created` datetime NOT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `description2` varchar(255) DEFAULT NULL,
  `description3` varchar(255) DEFAULT NULL,
  `description4` varchar(255) DEFAULT NULL,
  `description5` varchar(255) DEFAULT NULL,
  `description_de` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `last_updated` datetime NOT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `mobile_client` bit(1) NOT NULL,
  `number` varchar(255) NOT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `update_counter` int(11) DEFAULT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_category_id` bigint(20) NOT NULL,
  `color_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_baljhtm3rw84n3rk2wnpjds4q` (`number`),
  KEY `FKn29w0ovv8mxqy0ndqpe1cmchp` (`cost_unit_id`),
  KEY `FK7pyski1kn8nxjc6v8fdid3dl5` (`machine_id`),
  KEY `FK9vgc69boh227v82k4jythw10l` (`order_id`),
  KEY `FKecys04olfm2evsupngmwg1bye` (`order_item_id`),
  KEY `FK18ac09xkbjpccr9dunjlvuy2m` (`project_id`),
  KEY `FKiahyw398x101ueceouyjk83hs` (`workplace_id`),
  KEY `FK9d5ky3y0bbtkcki69fqxemx7l` (`workprocess_category_id`),
  KEY `number_idx` (`number`),
  KEY `FK6majxtu22otax9s3sslgr33ds` (`color_id`),
  CONSTRAINT `FK18ac09xkbjpccr9dunjlvuy2m` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FK6majxtu22otax9s3sslgr33ds` FOREIGN KEY (`color_id`) REFERENCES `cw_color` (`id`),
  CONSTRAINT `FK7pyski1kn8nxjc6v8fdid3dl5` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FK9d5ky3y0bbtkcki69fqxemx7l` FOREIGN KEY (`workprocess_category_id`) REFERENCES `cw_workprocess_category` (`id`),
  CONSTRAINT `FK9vgc69boh227v82k4jythw10l` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKecys04olfm2evsupngmwg1bye` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FKiahyw398x101ueceouyjk83hs` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKn29w0ovv8mxqy0ndqpe1cmchp` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workprocess`
--


--
-- Table structure for table `cw_workprocess_2_additional_data`
--

CREATE TABLE `cw_workprocess_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,
  `value` varchar(255) DEFAULT NULL,
  `workprocess_id` bigint(20) NOT NULL,
  `workprocess_additional_data_id` bigint(20) NOT NULL,
  `info_value` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKjf2ew22cn359jm4kwih4milar` (`workprocess_additional_data_id`),
  KEY `query1_idx` (`workprocess_id`,`workprocess_additional_data_id`),
  CONSTRAINT `FKbbkhpmqt46qg9rmshn1lcnqlr` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKjf2ew22cn359jm4kwih4milar` FOREIGN KEY (`workprocess_additional_data_id`) REFERENCES `cw_additional_data` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_workprocess_2_additional_data`
--


--
-- Table structure for table `cw_workprocess_category`
--

CREATE TABLE `cw_workprocess_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) NOT NULL,
  `description_en` 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_workprocess_category`
--


--
-- Table structure for table `cw_zeitbuch`
--

CREATE TABLE `cw_zeitbuch` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `absence_id` bigint(20) DEFAULT NULL,
  `booking_type` varchar(255) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `cost_unit_id` bigint(20) DEFAULT NULL,
  `date` datetime NOT NULL,
  `deleted` bit(1) DEFAULT NULL,
  `generated` bit(1) DEFAULT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `order_id` bigint(20) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `person_id` bigint(20) NOT NULL,
  `position` int(11) NOT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `workplace_id` bigint(20) DEFAULT NULL,
  `workprocess_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKht9olh06b02nxfhhxff0pp6h7` (`absence_id`),
  KEY `FKrepk57xk1jpcolg3o64lwdyjw` (`cost_unit_id`),
  KEY `FK90cphri1qjstnqlxftu3reesj` (`machine_id`),
  KEY `FKp9oxqne5a52rkkmjp0e5kfx0a` (`order_id`),
  KEY `FK88gl7v95h4lxwjt8r4fdecgd3` (`order_item_id`),
  KEY `FKc18wjsh3wft2koxm9nxv0r1mi` (`person_id`),
  KEY `FK61v87oj35lo4nmrs7ul1umvgd` (`project_id`),
  KEY `FKd1tk3ho4cvtnapxh1u39q2ovx` (`workplace_id`),
  KEY `FKlc74mcctfcfkrcdqvkhba4nks` (`workprocess_id`),
  CONSTRAINT `FK61v87oj35lo4nmrs7ul1umvgd` FOREIGN KEY (`project_id`) REFERENCES `cw_project` (`id`),
  CONSTRAINT `FK88gl7v95h4lxwjt8r4fdecgd3` FOREIGN KEY (`order_item_id`) REFERENCES `cw_order_item` (`id`),
  CONSTRAINT `FK90cphri1qjstnqlxftu3reesj` FOREIGN KEY (`machine_id`) REFERENCES `cw_machine` (`id`),
  CONSTRAINT `FKc18wjsh3wft2koxm9nxv0r1mi` FOREIGN KEY (`person_id`) REFERENCES `cw_person` (`id`),
  CONSTRAINT `FKd1tk3ho4cvtnapxh1u39q2ovx` FOREIGN KEY (`workplace_id`) REFERENCES `cw_workplace` (`id`),
  CONSTRAINT `FKht9olh06b02nxfhhxff0pp6h7` FOREIGN KEY (`absence_id`) REFERENCES `cw_absence` (`id`),
  CONSTRAINT `FKlc74mcctfcfkrcdqvkhba4nks` FOREIGN KEY (`workprocess_id`) REFERENCES `cw_workprocess` (`id`),
  CONSTRAINT `FKp9oxqne5a52rkkmjp0e5kfx0a` FOREIGN KEY (`order_id`) REFERENCES `cw_order` (`id`),
  CONSTRAINT `FKrepk57xk1jpcolg3o64lwdyjw` FOREIGN KEY (`cost_unit_id`) REFERENCES `cw_cost_unit` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cw_zeitbuch`
--


--
-- Table structure for table `file_upload`
--

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

--
-- Dumping data for table `file_upload`
--


--
-- Table structure for table `testdata`
--

CREATE TABLE `testdata` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `version` bigint(20) NOT NULL,
  `number` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `testdata`
--



