/* 07:58:46 gmspider gmspider */ CREATE TABLE `typ_zrusenia_zakona` (   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,   `nazov` varchar(50) DEFAULT NULL,   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/* 07:59:31 gmspider gmspider */ INSERT INTO `typ_zrusenia_zakona` (`id`, `nazov`) VALUES 	(1, 'Zrušenie'), 	(2, 'Nahradenie');
/* 08:08:28 gmspider gmspider */ ALTER TABLE `zakon` ADD `typ_zrusenia_id` INT(10)  NULL  DEFAULT NULL  AFTER `sluzba_id`;
/* 08:08:37 gmspider gmspider */ ALTER TABLE `zakon` ADD `poznamka_k_zruseniu` VARCHAR(255)  NULL  DEFAULT NULL  AFTER `typ_zrusenia_id`;
/* 08:08:45 gmspider gmspider */ ALTER TABLE `zakon` ADD `zakon_id` INT(10)  NULL  DEFAULT NULL  AFTER `poznamka_k_zruseniu`;
/* 08:08:50 gmspider gmspider */ ALTER TABLE `zakon` ADD `ukoncenie_k_datumu` DATE  NULL  AFTER `zakon_id`;
/* 08:50:49 gmspider gmspider */ ALTER TABLE `zakon` CHANGE `ukoncenie_k_datumu` `zrusenie_k_datumu` DATE  NULL  DEFAULT NULL;
/* 08:59:10 gmspider gmspider */ 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 ('185', '180', '4', 'zakon', 'zrusenie_k_datumu', NULL, NULL, 'Zrušenie k dátumu', '60', NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1');
/* 08:59:44 gmspider gmspider */ 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 ('186', '180', '2', 'zakon', 'poznamka_k_zruseniu', NULL, NULL, 'Poznámka k zrušeniu', '70', NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1');
/* 09:00:18 gmspider gmspider */ INSERT INTO `form_group` (`id`, `form_id`, `nazov`, `code`, `position`, `poznamka`, `group_type`) VALUES ('181', '18', 'Zrušenie legislatívneho predpisu', 'zakon_zrusenie', '20', NULL, '1');
/* 09:00:27 gmspider gmspider */ UPDATE `form_element` SET `form_group_id` = '181' WHERE `id` = '185';
/* 09:00:29 gmspider gmspider */ UPDATE `form_element` SET `form_group_id` = '181' WHERE `id` = '186';
/* 09:01:16 gmspider gmspider */ 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 ('187', '181', '2', 'zakon', 'typ_zrusenia_zakona_id', NULL, NULL, 'Typ zrušenia', '50', NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL, 'select2', NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, '1');
/* 09:01:23 gmspider gmspider */ UPDATE `form_element` SET `db_multi_table` = 'typ_zrusenia_zakona' WHERE `id` = '187';
/* 09:01:42 gmspider gmspider */ ALTER TABLE `zakon` CHANGE `typ_zrusenia_id` `typ_zrusenia_zakona_id` INT(10)  NULL  DEFAULT NULL;
/* 09:02:20 gmspider gmspider */ UPDATE `form_element` SET `direct_to_db` = NULL WHERE `id` = '187';
/* 09:02:23 gmspider gmspider */ UPDATE `form_element` SET `direct_to_db` = NULL WHERE `id` = '185';
/* 09:02:24 gmspider gmspider */ UPDATE `form_element` SET `direct_to_db` = NULL WHERE `id` = '186';

INSERT INTO `permission` (`id`, `nazov`)
VALUES
(166, 'zakon_all'),
(167, 'zmena_zakona_all'),
(168, 'riziko_all'),
(169, 'zdroj_rizika_all'),
(170, 'projekt_rizika_all');

INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES
(3, 166),
(3, 167),
(3, 168),
(3, 169),
(3, 170);

/* 09:15:43 gmspider gmspider */ INSERT INTO `permission` (`id`, `nazov`) VALUES ('171', 'bezpecnostne_opatrenie_all');
/* 09:15:53 gmspider gmspider */ INSERT INTO `role_permission` (`role_id`, `permission_id`) VALUES ('3', '171');
