Created
October 2, 2015 00:29
-
-
Save doofusdavid/99d6e7808406486e4953 to your computer and use it in GitHub Desktop.
test movies page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `movies` ( | |
`ID` int(11) NOT NULL AUTO_INCREMENT, | |
`MovieName` varchar(45) DEFAULT NULL, | |
`Rating` double DEFAULT NULL, | |
`DateAdded` timestamp NULL DEFAULT CURRENT_TIMESTAMP, | |
PRIMARY KEY (`ID`) | |
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; | |
CREATE TABLE `Rating` ( | |
`ID` int(11) NOT NULL AUTO_INCREMENT, | |
`Rating` int(11) DEFAULT NULL, | |
`MovieID` int(11) DEFAULT NULL, | |
PRIMARY KEY (`ID`), | |
KEY `fk_Rating_Movie_idx` (`MovieID`), | |
CONSTRAINT `fk_Rating_Movie` FOREIGN KEY (`MovieID`) REFERENCES `movies` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION | |
) ENGINE=InnoDB AUTO_INCREMENT=1000001 DEFAULT CHARSET=latin1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment