Location: PHPKode > projects > Web Task Manager with Email/SMS Voting > Calendar/admin/newtables.txt
CREATE TABLE UserEvents ( 
UserEventID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, 
UserID INT(11) NOT NULL,
EventID INT(11) NOT NULL
 ) TYPE = MYISAM;

CREATE TABLE Vote (
VoteID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
UserID INT(11) NOT NULL,
EventID INT(11) NOT NULL,
Decision INT(11) NOT NULL
 ) TYPE = MYISAM;

CREATE TABLE Message (
MessageID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
FromUserID INT(11) NOT NULL,
ToUserID INT(11) NOT NULL,
Subject varchar(100) NOT NULL default '',
Body text NOT NULL, 
IsRead BOOL,
MessageType INT(11),
IsSent BOOL,
GroupID INT(11),
ReminderID INT(11),
EventID INT(11)
) TYPE = MYISAM;

CREATE TABLE Groups (
GroupID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
GroupName varchar(100) NOT NULL default '',
Created TIMESTAMP,
TypeID INT(11),
UserID INT(11),
Description Text
) TYPE = MYISAM

CREATE TABLE GroupUsers (
UserGroupID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
UserID INT(11),
GroupID INT(11)
) TYPE = MYISAM;

CREATE TABLE Reminder (
ReminderID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
MessageID INT(11),
TimeDate TIMESTAMP,
EventID INT(11),
Complete BOOL
) TYPE = MYISAM;

CREATE TABLE GroupEvents (
UserID INT(11),
GroupID INT(11)
) TYPE = MYISAM;

ALTER TABLE calendar_users ADD COLUMN email varchar(100);
ALTER TABLE calendar_users ADD COLUMN phone varchar(50);


Return current item: Web Task Manager with Email/SMS Voting