Skip to content

Instantly share code, notes, and snippets.

@cakephp-tutorial
Created February 26, 2016 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cakephp-tutorial/039cfded3ad6004bceb5 to your computer and use it in GitHub Desktop.
Save cakephp-tutorial/039cfded3ad6004bceb5 to your computer and use it in GitHub Desktop.
CREATE TABLE `comments` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`comment` varchar(100) NOT NULL,
`article_id` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `FK_COMMENTS_ARTICLE_ID` (`article_id`),
CONSTRAINT `FK_COMMENTS_ARTICLE_ID` FOREIGN KEY (`article_id`) REFERENCES `articles` (`id`) ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment