SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `phi_poll_desc`
--

CREATE TABLE `phi_poll_desc` (
  `poll_id` mediumint(8) unsigned NOT NULL auto_increment,
  `question` varchar(255) NOT NULL default '',
  `description` tinytext NOT NULL,
  `user_id` int(5) unsigned NOT NULL default '0',
  `start_time` int(10) unsigned NOT NULL default '0',
  `end_time` int(10) unsigned NOT NULL default '0',
  `votes` smallint(5) unsigned NOT NULL default '0',
  `voters` smallint(5) unsigned NOT NULL default '0',
  `multiple` tinyint(1) unsigned NOT NULL default '0',
  `display` tinyint(1) unsigned NOT NULL default '0',
  `weight` smallint(5) unsigned NOT NULL default '0',
  `mail_status` tinyint(1) unsigned NOT NULL default '0',
  `instance` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`poll_id`),
  KEY `end_time` (`end_time`),
  KEY `display` (`display`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `phi_poll_log`
--

CREATE TABLE `phi_poll_log` (
  `log_id` int(10) unsigned NOT NULL auto_increment,
  `poll_id` mediumint(8) unsigned NOT NULL default '0',
  `option_id` int(10) unsigned NOT NULL default '0',
  `ip` char(15) NOT NULL default '',
  `user_id` int(5) unsigned NOT NULL default '0',
  `time` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`log_id`),
  KEY `poll_id_user_id` (`poll_id`,`user_id`),
  KEY `poll_id_ip` (`poll_id`,`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `phi_poll_option`
--

CREATE TABLE `phi_poll_option` (
  `option_id` int(10) unsigned NOT NULL auto_increment,
  `poll_id` mediumint(8) unsigned NOT NULL default '0',
  `option_text` varchar(255) NOT NULL default '',
  `option_count` smallint(5) unsigned NOT NULL default '0',
  `option_color` varchar(25) NOT NULL default '',
  `option_order` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`option_id`),
  KEY `poll_id` (`poll_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `phi_poll_option_seq`
--

CREATE TABLE `phi_poll_option_seq` (
  `id` int(10) unsigned NOT NULL auto_increment,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
