/*2*/ ALTER TABLE `clanok`
	ADD COLUMN `publikovat` TINYINT(1) NULL DEFAULT '0' AFTER `clanok_id`,
	ADD COLUMN `datum_zverejnenia` DATE NULL DEFAULT NULL AFTER `publikovat`;
/*3*/ INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `column_title`, `position`, `direct_to_db`) VALUES ('44', '3003', '3', 'clanok', 'publikovat', 'Publikovať', '40', '1');
/*4*/ UPDATE `form_element` SET `default_val`='1' WHERE  `id`=44;
/*5*/ INSERT INTO `form_element` (`id`, `form_group_id`, `form_element_type_id`, `db_table`, `db_column`, `column_title`, `position`, `direct_to_db`, `default_val`) VALUES ('45', '3003', '4', 'clanok', 'datum_zverejnenia', 'Dátum zverejnenia', '50', '1', 'NOW');
/*6*/ UPDATE `form_element` SET `position`='50' WHERE  `id`=44;
/*7*/ UPDATE `form_element` SET `position`='60' WHERE  `id`=45;
/*8*/ UPDATE `form_element` SET `position`='40' WHERE  `id`=45;

UPDATE clanok SET datum_zverejnenia = CURDATE(), publikovat = 1 WHERE visibility_type = 1;