CREATE TABLE `bezpecnostne_opatrenie` (
	`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`visibility_type` INT(11) NULL DEFAULT NULL,
	`riziko_id` INT(10) UNSIGNED NULL DEFAULT NULL,
	`popis` TEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`poradie` INT(11) NULL DEFAULT NULL,
	PRIMARY KEY (`id`) USING BTREE,
	INDEX `FK_bezpecnostne_opatrenie_riziko` (`riziko_id`) USING BTREE,
	CONSTRAINT `FK_bezpecnostne_opatrenie_riziko` FOREIGN KEY (`riziko_id`) REFERENCES `riziko` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

INSERT INTO `form` (`id`, `nazov`, `code`) VALUES (192, 'Bezpečnostné opatrenie', 'bezpecnostne_opatrenie');
INSERT INTO `form_group` (`id`, `form_id`, `nazov`, `code`, `position`, `poznamka`, `group_type`) VALUES (193, 192, 'Základné informácie', 'bezpecnostne_opatrenie_zakladne_informacie', 10, NULL, 1);
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 (220, 193, 13, 'bezpecnostne_opatrenie', 'riziko_id', 'riziko', NULL, 'Riziko', 0, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
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 (221, 193, 2, 'bezpecnostne_opatrenie', 'popis', NULL, NULL, 'Popis', 10, NULL, 600, 300, NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (195, 190, 'Pridanie bezpečnostného opatrenia', 'bezpecnostne_opatrenie_pridaj', NULL, 3, 0);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (196, 190, 'Editovanie bezpečnostného opatrenia', 'bezpecnostne_opatrenie_edituj', NULL, 3, 0);

INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (619, 'Pridanie bezpečnostného opatrenia', 'bezpecnostne_opatrenie_pridaj', 'bezpecnostne_opatrenie');
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (620, 'Editovanie bezpečnostného opatrenia', 'bezpecnostne_opatrenie_edituj', 'bezpecnostne_opatrenie');
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (621, 'Zmazanie bezpečnostného opatrenia', 'bezpecnostne_opatrenie_zmaz', 'bezpecnostne_opatrenie');

