CREATE TABLE `perioda_fakturacie` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nazov` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

INSERT INTO `perioda_fakturacie` (`id`, `nazov`)
VALUES
  (1, 'Denne'),
  (2, 'Týždenne'),
  (3, 'Mesačne'),
  (4, 'Štvrťročne'),
  (5, 'Ročne');

/* 20:46:19 */ ALTER TABLE `zmluva` ADD `datum_podpisu` DATE  NULL  AFTER `zmluva_id`;
/* 20:46:29 */ ALTER TABLE `zmluva` ADD `na_dobu_neurcitu` TINYINT(1)  NOT NULL  DEFAULT '0'  AFTER `datum_podpisu`;

/* 20:46:48 */ ALTER TABLE `zmluva` DROP FOREIGN KEY `FK1_perioda_fakturacie_id`;
/* 20:47:07 */ ALTER TABLE `zmluva` ADD CONSTRAINT `FK_zmluva_perioda_fakturacie` FOREIGN KEY (`perioda_fakturacie_id`) REFERENCES `perioda_fakturacie` (`id`);

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
  (106, 11, 4, 'zmluva', 'datum_podpisu', NULL, NULL, 'Dátum podpisu', 45, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  (107, 11, 3, 'zmluva', 'na_dobu_neurcitu', NULL, NULL, 'Na dobu neurčitú', 55, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  (108, 11, 1, 'zmluva', 'stare_cislo', NULL, NULL, 'Staré číslo zmluvy', 15, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '<vlvalidator name=\"customStareCislo\" type=\"custom\" function=\"vdaemonStareCislo\" />', NULL, NULL, NULL, NULL);

/* 20:51:56 */ ALTER TABLE `zmluva` ADD `stare_cislo` VARCHAR(255)  NULL  DEFAULT NULL  AFTER `cislo`;
/* 20:55:17 */ ALTER TABLE `zmluva` ADD `typ_zmeny_zmluvy_id` INT(11)  UNSIGNED  NULL  DEFAULT NULL  AFTER `na_dobu_neurcitu`;
/* 20:55:36 */ ALTER TABLE `zmluva` ADD CONSTRAINT `FK_typ_zmeny_zmluvy_id` FOREIGN KEY (`typ_zmeny_zmluvy_id`) REFERENCES `typ_zmeny_zmluvy` (`id`);

/* 21:09:56 */ ALTER TABLE `obchodny_partner` DROP `pocet_zamestnancov`;
