DROP TABLE IF EXISTS ezin_polls;
CREATE TABLE ezin_polls
(
id int(11) NOT NULL auto_increment,
section_id int(11) NOT NULL default '0',
-- lang char(2) default NULL, -- apply when section is NULL
dt_valid_from datetime default NULL,
dt_valid_to datetime default NULL,
votes int default NULL,
answers int default NULL,
question varchar(255) NOT NULL,
description text,
PRIMARY KEY (id),
KEY ezin_polls_section_id (section_id),
KEY ezin_polls_dt_valid_from (dt_valid_from),
KEY ezin_polls_dt_valid_to (dt_valid_to)
);
DROP TABLE IF EXISTS ezin_poll_answers;
CREATE TABLE ezin_poll_answers
(
id int(11) NOT NULL auto_increment,
poll_id int(11) NOT NULL,
answer varchar(255) NOT NULL,
votes int default 0,
PRIMARY KEY (id),
KEY ezin_poll_answers_poll_id (poll_id)
);
Platon Group <platon@platon.sk> http://platon.sk/
|