/*1*/ CREATE TABLE `zamestnanec_obchodny_partner_archiv` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `zamestnanec_id` INT(11) UNSIGNED NOT NULL,
  `obchodny_partner_id` INT(10) UNSIGNED NOT NULL,
  `sluzba_id` INT(11) UNSIGNED NULL DEFAULT NULL,
  `permission_id` INT(10) UNSIGNED NULL DEFAULT NULL,
  `visibility_type` TINYINT(1) UNSIGNED NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `obchodny_partner_id` (`obchodny_partner_id`)
)
  COLLATE='utf8_general_ci'
  ENGINE=InnoDB
;

/*3*/ INSERT INTO zamestnanec_obchodny_partner_archiv SELECT * FROM zamestnanec_obchodny_partner;