Last active
August 29, 2015 14:18
-
-
Save DTSCode/23a5f0ae3833d63f7632 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Nicks ( id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, nick VARCHAR(200) NOT NULL); | |
CREATE TABLE Quote ( | |
id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
grabber_id MEDIUMINT UNSIGNED NOT NULL, | |
sayer_id MEDIUMINT UNSIGNED NOT NULL, | |
quote VARCHAR(1500) NOT NULL, | |
CONSTRAINT `fk_grabber_id` | |
FOREIGN KEY (grabber_id) REFERENCES Nicks (id) | |
ON DELETE CASCADE, | |
CONSTRAINT `fk_sayer_id` | |
FOREIGN KEY (sayer_id) REFERENCES Nicks (id) | |
ON DELETE CASCADE | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment