<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
$success=true;

set_time_limit(0);

Db::i()->query("UPDATE ?_tree SET path='' WHERE symlink>0");
Db::i()->query("ALTER TABLE ?_tree CHANGE `tree_name` `name` TINYTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");

if (Db::i()->selectCell("SELECT module_id FROM ?_modules WHERE module='feedback'")) {
	Db::i()->query(
		"CREATE TABLE IF NOT EXISTS ?_feedback_form (
		`id` int(11) NOT NULL auto_increment,
		`tree_id` int(11) NOT NULL,
		`position` int(11) NOT NULL DEFAULT '0',
		`options` text NOT NULL,
		PRIMARY KEY  (`id`)
		) ENGINE=MyISAM DEFAULT CHARSET=utf8;"
	);
}

