<?php
/**
 * JComments reports Table ETL for #__jcomments_reports
 * 
 * @version 2.0
 * @package Migrator
 * @author Sergey M. Litvinov (smart@joomlatune.ru)
 * @copyright (C) 2008-2009 by Sergey M. Litvinov (http://www.joomlatune.ru)
 * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
 */

class JComments_Reports_ETL extends ETLPlugin
{
	function getName()
	{
		return "JComments Reports ETL Plugin";
	}
	
	function getAssociatedTable()
	{
		return 'jcomments_reports';
	}
	
	function mapvalues( $key, $value )
	{
		switch ($key) {
			default:
				return $value;
				break;
		}
	}

	function getSQLPrologue()
	{
		$ret = <<<EOT

CREATE TABLE IF NOT EXISTS `#__jcomments_reports` (
`id` INT(11) UNSIGNED NOT NULL auto_increment,
`commentid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`userid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`name`VARCHAR(255) NOT NULL DEFAULT '',
`ip` VARCHAR(15) NOT NULL DEFAULT '',
`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`reason` TINYTEXT  NOT NULL,
`status` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY  (`id`)
) TYPE=MyISAM CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
    
EOT;
        return $ret;
    }
}
?>