by digital1 » Thu Nov 04, 2010 8:16 am
I tried sending you a PM but it was sitting in my outbox. I am just going to paste the create code here.
CREATE TABLE `show` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`venueId` int(11) NOT NULL,
`hostId` int(11) NOT NULL,
`seasonId` int(11) NOT NULL,
`eventDate` datetime NOT NULL,
`canceled` tinyint(1) NOT NULL DEFAULT '0',
`calendar_name` varchar(255) NOT NULL,
`cancelledReason` varchar(255) DEFAULT NULL,
`discounted` tinyint(1) NOT NULL DEFAULT '0',
`discountedReason` varchar(255) DEFAULT NULL,
`numPeople` int(11) NOT NULL DEFAULT '0',
`numTeams` int(11) NOT NULL DEFAULT '0',
`amountPaid` double NOT NULL DEFAULT '0',
`settledUp` date DEFAULT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`updatedId` int(11) NOT NULL DEFAULT '0',
`updatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `venueId_fk` (`venueId`),
KEY `hostId_fk` (`hostId`),
KEY `updatedId_fk` (`updatedId`),
KEY `seasonId_fk` (`seasonId`),
CONSTRAINT `show_ibfk_13` FOREIGN KEY (`updatedId`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
CONSTRAINT `show_ibfk_10` FOREIGN KEY (`venueId`) REFERENCES `venue` (`id`) ON UPDATE CASCADE,
CONSTRAINT `show_ibfk_11` FOREIGN KEY (`hostId`) REFERENCES `host` (`id`) ON UPDATE CASCADE,
CONSTRAINT `show_ibfk_12` FOREIGN KEY (`seasonId`) REFERENCES `season` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1