SHARE
TWEET

Untitled

a guest Apr 18th, 2012 31 Never
  1. CREATE TABLE IF NOT EXISTS `comments` (
  2.   `id` int(11) NOT NULL AUTO_INCREMENT,
  3.   `comment` text NOT NULL,
  4.   `club_id` int(9) NOT NULL,
  5.   `comment_date` date NOT NULL,
  6.   PRIMARY KEY (`id`),
  7.   UNIQUE KEY `club_id` (`club_id`)
  8. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
  9.  
  10. --
  11. -- Constraints for dumped tables
  12. --
  13.  
  14. --
  15. -- Constraints for table `comments`
  16. --
  17. ALTER TABLE `comments`
  18.   ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`club_id`) REFERENCES `clubs` (`id`);
RAW Paste Data
Top