## This is a schema for MySQL for 
## the concept of Polls (voting/answer mechanism in Jetspeed)
##
## Please see the Html documentation for more information 
## on this SQL. Equivalent contributions of this for other 
## databases are welcome.

## The default database should be named "Turbine"

## This schema is imported into MySQL with the command:
## mysql Turbine < MySQL_users_roles_permissions.sql


drop table if exists Polls;

create table Polls  (
    POLLID              integer AUTO_INCREMENT PRIMARY KEY,
    TITLE               varchar (255) NOT NULL,
    UNIQUE (TITLE)
);



drop table if exists Answers;

create table Answers  (
    ANSWERID            integer AUTO_INCREMENT PRIMARY KEY,
    POLLID              integer NOT NULL,
    TITLE               varchar (255) NOT NULL,
    COUNT               integer NOT NULL,
    INDEX POLLID_index ( POLLID )
);


