ALTER TABLE `subor`
	ADD COLUMN `datum_vytvorenia` DATETIME NULL AFTER `visibility_type`,
	ADD COLUMN `zamestnanec_id` INT NULL AFTER `datum_vytvorenia`,
	ADD COLUMN `hash` VARCHAR(50) NULL AFTER `zamestnanec_id`;

CREATE TABLE IF NOT EXISTS `rozsireny_typ_suboru` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nazov` varchar(255) DEFAULT NULL,
  `code` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 AVG_ROW_LENGTH=32;

CREATE TABLE IF NOT EXISTS `subor_rozsireny_typ_suboru` (
  `subor_id` int(10) unsigned NOT NULL,
  `rozsireny_typ_suboru_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`subor_id`,`rozsireny_typ_suboru_id`),
  KEY `subor_has_rozsireny_typ_suboru_FKIndex1` (`subor_id`),
  KEY `subor_has_rozsireny_typ_suboru_FKIndex2` (`rozsireny_typ_suboru_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;