Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (17 sloc) 601 Bytes
CREATE TABLE IF NOT EXISTS `polls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tenant` bigint(20) NOT NULL,
`name` varchar(100) NOT NULL,
`data` text,
PRIMARY KEY (`id`),
KEY `tenant` (`tenant`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `polls_responses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`poll` int(11) NOT NULL,
`value` varchar(15) NOT NULL,
`response` int(11) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `poll` (`poll`,`value`,`response`,`time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;