<?php // $Id: createStatBase.inc.php 9707 2007-12-12 13:46:31Z mlaurent $
if ( count( get_included_files() ) == 1 ) die( '---' );
/**
 * CLAROLINE
 *
 * Create Statistics Tables
 * @var $statsTblPrefixForm prefix set during  install, and keep in mainconf
 * @private $creationStatementList[] var where build sql request.
 *
 * @version 1.8 $Revision: 9707 $
 *
 * @copyright 2001-2006 Universite catholique de Louvain (UCL)
 *
 * @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
 *
 * @see http://www.claroline.net/wiki/index.php/Install
 *
 * @author Claro Team <cvs@claroline.net>
 * @author Christophe Gesché <moosh@claroline.net>
 *
 * @package INSTALL
 *
 */

/*         claro_sql_query("DROP TABLE IF EXISTS track_e_default");
 *         claro_sql_query("DROP TABLE IF EXISTS track_e_login");
 *         claro_sql_query("DROP TABLE IF EXISTS track_e_open");
 *
 */
        $creationStatementList[] = "CREATE TABLE `".$statsTblPrefixForm."track_e_default` (
                  `default_id` int(11) NOT NULL auto_increment,
                  `default_user_id` int(11)  NOT NULL default '0',
                  `default_cours_code` varchar(40) NOT NULL default '',
                  `default_date` datetime NOT NULL default '0000-00-00 00:00:00',
                  `default_event_type` varchar(20) NOT NULL default '',
                  `default_value_type` varchar(20) NOT NULL default '',
                  `default_value` tinytext NOT NULL,
                  PRIMARY KEY  (`default_id`),
                  KEY `default_user_id` (`default_user_id`)
                ) TYPE=MyISAM COMMENT='Use for other developpers users'";

        $creationStatementList[] = "CREATE TABLE `".$statsTblPrefixForm."track_e_login` (
                  `login_id` int(11) NOT NULL auto_increment,
                  `login_user_id` int(11)  NOT NULL default '0',
                  `login_date` datetime NOT NULL default '0000-00-00 00:00:00',
                  `login_ip` char(15) NOT NULL default '',
                  PRIMARY KEY  (`login_id`),
                  KEY `login_user_id` (`login_user_id`)
                ) TYPE=MyISAM COMMENT='Record informations about logins'";

        $creationStatementList[] = "CREATE TABLE `".$statsTblPrefixForm."track_e_open` (
                  `open_id` int(11) NOT NULL auto_increment,
                  `open_date` datetime NOT NULL default '0000-00-00 00:00:00',
                  PRIMARY KEY  (`open_id`)
                ) TYPE=MyISAM COMMENT='Record informations about software used by users'";

?>