--
-- Struktura tabulky `zas_data`
--

CREATE TABLE IF NOT EXISTS `zas2_data` (
  `id_zas` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `status` int(10) unsigned DEFAULT NULL,
  `change_id` int(10) unsigned DEFAULT NULL,
  `change_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `change_user` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data0` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data1` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data2` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data3` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data4` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data5` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data6` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data7` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data8` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data9` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data10` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data11` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data12` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data13` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data14` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data15` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data16` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data17` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data18` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data19` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  PRIMARY KEY (`id_zas`),
  KEY `status` (`status`),
  KEY `change_id` (`change_id`),
  KEY `change_date` (`change_date`),
  KEY `change_user` (`change_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `zas2_changes` (
  `id_zas` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `status` int(10) unsigned DEFAULT NULL,
  `change_id` int(10) unsigned DEFAULT NULL,
  `change_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `change_user` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data0` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data1` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data2` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data3` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data4` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data5` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data6` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data7` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data8` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data9` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data10` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data11` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data12` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data13` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data14` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data15` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data16` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data17` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data18` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  `data19` text CHARACTER SET utf8 COLLATE utf8_czech_ci,
  PRIMARY KEY (`id_zas`),
  KEY `status` (`status`),
  KEY `change_id` (`change_id`),
  KEY `change_date` (`change_date`),
  KEY `change_user` (`change_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


ALTER TABLE `zas_data` ADD `change_id` INT UNSIGNED NULL DEFAULT NULL AFTER `status`, ADD `change_date` DATETIME NULL DEFAULT CURRENT_TIMESTAMP AFTER `change_id`, ADD `change_user` TEXT NULL AFTER `change_date`;
ALTER TABLE `zas_data` CHANGE `change_user` `change_user` TEXT CHARACTER SET utf8 COLLATE utf8_czech_ci NULL DEFAULT NULL;