CREATE TABLE `zmena_zakona` (
	`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`visibility_type` INT(11) NULL DEFAULT NULL,
	`zakon_id` INT(10) UNSIGNED NULL DEFAULT NULL,
	`cislo` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`ucinnost_od` DATE NULL DEFAULT NULL,
	`text` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	PRIMARY KEY (`id`) USING BTREE,
	INDEX `zmena_zakona_zakon` (`zakon_id`) USING BTREE,
	CONSTRAINT `zmena_zakona_zakon` FOREIGN KEY (`zakon_id`) REFERENCES `gmspider`.`zakon` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

INSERT INTO `form` (`id`, `nazov`, `code`) VALUES (19, 'Zmena zákona', 'zmena_zakona');
INSERT INTO `form_group` (`id`, `form_id`, `nazov`, `code`, `position`, `poznamka`, `group_type`) VALUES (190, 19, 'Základné informácie', 'zmena_zakona_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 (190, 190, 13, 'zmena_zakona', 'zakon_id', 'zakon', NULL, 'Zákon', 0, NULL, NULL, NULL, NULL, NULL, 1, NULL, 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 (191, 190, 1, 'zmena_zakona', 'cislo', NULL, NULL, 'Číslo', 10, NULL, NULL, NULL, NULL, NULL, 1, NULL, 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 (192, 190, 4, 'zmena_zakona', 'ucinnost_od', NULL, NULL, 'Účinnosť od', 20, NULL, NULL, NULL, NULL, NULL, 1, NULL, 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 (193, 190, 10, 'zmena_zakona', 'text', NULL, NULL, 'Text', 30, NULL, 600, 300, NULL, NULL, 1, NULL, 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 (186, 181, 'Pridanie zmeny zákona', 'zmena_zakona_pridaj', NULL, 3, 0);
INSERT INTO `menu` (`id`, `menu_id`, `nazov`, `page`, `poradie`, `level`, `visibility_type`) VALUES (187, 181, 'Editovanie zmeny zákona', 'zmena_zakona_edituj', NULL, 3, 0);

INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (183, 'Pridanie zmeny zákona', 'zmena_zakona_pridaj', 'zmena_zakona');
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (184, 'Editovanie zmeny zákona', 'zmena_zakona_edituj', 'zmena_zakona');
INSERT INTO `log_type` (`id`, `nazov`, `code`, `primary_table`) VALUES (185, 'Zmazanie zmeny zákona', 'zmena_zakona_zmaz', 'zmena_zakona');

