UPDATE zmluva SET datum_ukoncenia = platnost_do WHERE stav_zmluvy_id = 3 AND visibility_type = 1 AND platnost_do < CURDATE() AND datum_ukoncenia IS NULL AND platnost_do IS NOT NULL;
UPDATE zmluva SET datum_ukoncenia = NULL WHERE datum_ukoncenia = '0000-00-00';
/* 17:31:04 */ UPDATE `form_element` SET `vdaemon` = '<vlvalidator name=\"customPlatnostDo\" type=\"custom\" function=\"vdaemonPlatnostDo\" />' WHERE `id` = '57';

INSERT INTO `form_group` (`id`, `form_id`, `nazov`, `code`, `position`, `poznamka`, `group_type`)
VALUES
  (22, 4, 'Poznámky', 'zmluva_poznamky', 40, NULL, 1);
/* 08:31:32 */ UPDATE `form_element` SET `form_group_id` = '22' WHERE `id` = '69';
/* 08:31:39 */ UPDATE `form_element` SET `form_group_id` = '22' WHERE `id` = '115';
/* 08:38:18 */ CREATE TABLE `form_visibility` (   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,   `form_id` int(10) unsigned NOT NULL,   `code` varchar(100) DEFAULT NULL,   `title` varchar(150) DEFAULT NULL,   PRIMARY KEY (`id`),   KEY `form_visibility_FKIndex1` (`form_id`) ) ENGINE=InnoDb DEFAULT CHARSET=utf8;
/* 08:38:51 */ CREATE TABLE `form_visibility_form_element` (   `form_visibility_id` int(10) unsigned NOT NULL,   `form_element_id` int(10) unsigned NOT NULL,   PRIMARY KEY (`form_visibility_id`,`form_element_id`) ) ENGINE=InnoDb DEFAULT CHARSET=utf8;
/* 08:39:22 */ ALTER TABLE `form_visibility_form_element` ADD CONSTRAINT `FK_form_visibility_form_element_form_visibility_id` FOREIGN KEY (`form_visibility_id`) REFERENCES `form_visibility` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
/* 08:39:46 */ ALTER TABLE `form_visibility_form_element` ADD CONSTRAINT `FK_form_visibility_form_element_form_form_element_id` FOREIGN KEY (`form_element_id`) REFERENCES `form_element` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
/* 08:40:15 */ INSERT INTO `form_visibility` (`id`, `form_id`, `code`, `title`) VALUES ('1', '4', 'zmluva_po_zverejneni', NULL);
/* 08:40:42 */ INSERT INTO `form_visibility_form_element` (`form_visibility_id`, `form_element_id`) VALUES ('1', '69');
/* 08:40:45 */ INSERT INTO `form_visibility_form_element` (`form_visibility_id`, `form_element_id`) VALUES ('1', '115');

/* 09:41:12 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Nové Mesto' WHERE `id` = '2913';
/* 09:42:00 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Staré Mesto' WHERE `id` = '182';
/* 09:42:35 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Ružinov' WHERE `id` = '181';
/* 09:42:51 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Petržalka' WHERE `id` = '177';
/* 09:42:53 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Podunajské Biskupice' WHERE `id` = '178';
/* 09:42:56 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Rača' WHERE `id` = '179';
/* 09:42:58 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Rusovce' WHERE `id` = '180';
/* 09:43:00 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Vajnory' WHERE `id` = '183';
/* 09:43:04 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Vrakuňa' WHERE `id` = '184';
/* 09:43:07 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Záhorská Bystrica' WHERE `id` = '185';
/* 09:43:10 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Lamač' WHERE `id` = '175';
/* 09:43:13 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Karlova Ves' WHERE `id` = '174';
/* 09:43:16 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Jarovce' WHERE `id` = '173';
/* 09:43:19 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Dúbravka' WHERE `id` = '172';
/* 09:43:21 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Devínska Nová Ves' WHERE `id` = '171';
/* 09:43:23 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Devín' WHERE `id` = '170';
/* 09:43:26 */ UPDATE `obec` SET `nazov` = 'Bratislava - mestská časť Čunovo' WHERE `id` = '169';

/* 11:44:14 */ ALTER TABLE `zmluva` CHANGE `datum_zrusenia` `datum_vytvorenia_zmeny` DATETIME  NULL  DEFAULT NULL;
/* 12:03:44 */ UPDATE `form_element` SET `db_column` = 'datum_vytvorenia_zmeny', `column_title` = 'Dátum vytvorenia zmeny' WHERE `id` = '70';
/* 12:58:00 */ ALTER TABLE `zmluva` ADD `poznamka_k_zmene` TEXT  NULL  AFTER `edicia`;
/* 12:59:33 */ 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 ('116', '12', '2', 'zmluva', 'poznamka_k_zmene', NULL, NULL, 'Poznámka k zmene', '100', NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
/* 13:00:00 */ UPDATE `form_element` SET `position` = '10' WHERE `id` = '69';
/* 13:00:01 */ UPDATE `form_element` SET `position` = '20' WHERE `id` = '115';
/* 13:00:07 */ UPDATE `form_element` SET `position` = '90' WHERE `id` = '116';
/* 13:08:35 */ UPDATE `form_element` SET `read_only` = '1' WHERE `id` = '116';

/* 08:10:06 */ INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES ('57', 'Zmazanie práv pre zamestnanca zo zmluvy', 'zamestnanec_obchodny_partner_zmluva_zmaz', NULL);
