<?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;

Db::i()->query("ALTER TABLE ?_users ADD `autologin` CHAR( 32 ) NULL DEFAULT NULL AFTER `pass`");
Db::i()->query("ALTER TABLE ?_users DROP `new_pass`");

Db::i()->query(
	"ALTER TABLE ?_comments ADD `total_votes` INT NOT NULL DEFAULT '0',
	ADD `vote_result` INT NOT NULL DEFAULT '0',
	ADD `rating` INT NOT NULL DEFAULT '0'"
);
				
if (Db::i()->selectCell("SELECT module_id FROM ?_modules WHERE module='lc_album'")) {
	Db::i()->query(
		"ALTER TABLE ?_lc_album_images ADD `total_votes` INT NOT NULL DEFAULT '0',
		ADD `vote_result` INT NOT NULL DEFAULT '0',
		ADD `rating` INT NOT NULL DEFAULT '0'"
	);
}