/*13*/ INSERT INTO `log_type` (`id`, `nazov`, `code`) VALUES (34, 'Zmena zverejni dokumenty', 'zmena_zverejni_dokumenty');
/*15*/ ALTER TABLE `role`
	ADD COLUMN `code` VARCHAR(50) NOT NULL AFTER `nazov`;


SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE permission;
TRUNCATE TABLE role;
TRUNCATE TABLE role_permission;
INSERT INTO `permission` (`id`, `nazov`) VALUES
	(1, 'Zobrazenie'),
	(5, 'Pridanie, zobrazenie'),
	(100, 'obchodny_partner_all'),
	(101, 'osoba_all'),
	(102, 'obchodny_partner_view'),
	(103, 'majetok_all'),
	(104, 'clanok_all'),
	(105, 'uloha_all'),
	(106, 'dokument_all'),
	(107, 'zmena_all'),
	(108, 'kalendar_all'),
	(109, 'kalendar_udalost_all'),
	(110, 'vzorovy_dokument_all'),
	(111, 'vzorova_smernica_all'),
	(112, 'smernica_all'),
	(113, 'dokument_smernica_all'),
	(114, 'dokument_majetok_all'),
	(999, 'all');
INSERT INTO `role` (`id`, `nazov`, `code`) VALUES
	(1, 'Administrátor', 'administrator'),
	(2, 'Obchodný zástupca', 'obchodny_zastupca'),
	(3, 'Technik', 'technik');
INSERT INTO `role_permission` (`role_id`, `permission_id`) VALUES
	(1, 999),
	(2, 100),
	(2, 101),
	(2, 105),
	(2, 108),
	(2, 109),
	(3, 101),
	(3, 102),
	(3, 103),
	(3, 104),
	(3, 105),
	(3, 106),
	(3, 107),
	(3, 108),
	(3, 109),
	(3, 110),
	(3, 111),
	(3, 112),
	(3, 113),
	(3, 114);
