INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`)
VALUES
  (14, 1, 'Zmluvy pred ukončením', 'zmluva_pred_ukoncenim_vypis', 30, 2, 1);

/* 06:49:39 */ CREATE TABLE `pracovna_pozicia` (   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,   `nazov` varchar(255) DEFAULT NULL,   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/* 06:49:51 */ INSERT INTO `pracovna_pozicia` (`id`, `nazov`) VALUES ('1', 'Vedúci pobočky');
/* 06:50:24 */ CREATE TABLE `zamestnanec_pracovna_pozicia` (   `zamestnanec_id` int(11) unsigned NOT NULL,   `pracovna_pozicia_id` int(11) unsigned NOT NULL,   PRIMARY KEY (`zamestnanec_id`,`pracovna_pozicia_id`),   KEY `pracovna_pozicia_id` (`pracovna_pozicia_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/* 06:51:13 */ INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES ('67', '21001', '9', 'zamestnanec', 'pracovna_pozicia', NULL, NULL, 'Pracovné pozícia', '60', NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL, 'select2', NULL, '1', '1', NULL, NULL, NULL, NULL, NULL, NULL);
/* 06:51:24 */ UPDATE `form_element` SET `db_column` = 'pracovna_pozicia_id', `db_multi_table` = 'pracovna_pozicia' WHERE `id` = '67';
/* 06:52:01 */ UPDATE `form_element` SET `position` = '60' WHERE `id` = '51';
/* 06:52:05 */ UPDATE `form_element` SET `position` = '70' WHERE `id` = '67';
/* 06:52:09 */ UPDATE `form_element` SET `position` = '70' WHERE `id` = '51';
/* 06:52:11 */ UPDATE `form_element` SET `position` = '80' WHERE `id` = '67';
/* 15:00:22 */ UPDATE `form_element` SET `required` = '1' WHERE `id` = '60';

INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`)
VALUES
  (68, 11, 11, 'zmluva', 'datum_zverejnenia', NULL, NULL, 'Dátum zverejnenia', 80, '{\"datetime_format\":\"d.m.Y H:i:s\",\"step\":1}', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1);

/* 20:54:34 */ ALTER TABLE `zmluva` ADD `poznamka` TEXT  NULL  AFTER `datum_zverejnenia`;
/* 20:55:29 */ INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES ('69', '13', '2', 'zmluva', 'poznamka', NULL, NULL, 'Poznámka', '90', NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
/* 20:56:14 */ UPDATE `form_element` SET `form_group_id` = '12' WHERE `id` = '69';
/* 21:10:32 */ INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES ('70', '11', '11', 'zmluva', 'datum_zrusenia', NULL, NULL, 'Dátum zrušenia', '90', '{\"datetime_format\":\"d.m.Y H:i:s\",\"step\":1}', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1');
/* 21:10:35 */ UPDATE `form_element` SET `position` = '100' WHERE `id` = '70';
/* 21:11:05 */ ALTER TABLE `zmluva` ADD `datum_zrusenia` DATETIME  NULL  AFTER `poznamka`;
/* 22:51:56 */ ALTER TABLE `polozka_zmluvy_sluzba` DROP FOREIGN KEY `FK_polozka_zmluvy_polozka_zmluvy`;
/* 22:52:33 */ ALTER TABLE `polozka_zmluvy_sluzba` ADD CONSTRAINT `FK_polozka_zmluvy_sluzba_polozka_zmluvy` FOREIGN KEY (`polozka_zmluvy_id`) REFERENCES `polozka_zmluvy` (`id`);
/* 13:02:22 */ ALTER TABLE `zmluva` ADD `zmluva_id` INT(11)  NULL  DEFAULT NULL  AFTER `datum_zrusenia`;

CREATE TABLE `typ_zmeny_zmluvy` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `nazov` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

INSERT INTO `typ_zmeny_zmluvy` (`id`, `nazov`)
VALUES
  (1, 'Interná'),
  (2, 'Externá'),
  (3, 'Dodatok'),
  (4, 'Výpoveď');

/* 14:01:21 */ INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `db_multi_table`, `db_multivalue_table`, `column_title`, `position`, `attribute`, `width`, `height`, `help`, `example`, `direct_to_db`, `required`, `number`, `float_number`, `email`, `css_style`, `css_class`, `javascript`, `direct_multi_label`, `direct_multi_data`, `default_val`, `vdaemon`, `add_empty_option`, `html`, `lang_code`, `read_only`) VALUES ('110', '12', '5', 'zmluva', 'typ_zmeny_zmluvy_id', 'typ_zmeny_zmluvy', NULL, 'Vytvorené zmenou', '30', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'select2', NULL, '1', NULL, NULL, NULL, '1', NULL, NULL, '1');

/* 14:17:11 */ UPDATE `form_element` SET `direct_to_db` = '0', `read_only` = '1' WHERE `id` = '58';
/* 14:19:06 */ UPDATE `zmluva` SET `stav_zmluvy_id` = '1' WHERE `id` = '13';
