Skip to content

Instantly share code, notes, and snippets.

@pboethig
Created July 16, 2016 10:05
Show Gist options
  • Save pboethig/428a9d1ae944ff5490f3d553c9ec905d to your computer and use it in GitHub Desktop.
Save pboethig/428a9d1ae944ff5490f3d553c9ec905d to your computer and use it in GitHub Desktop.
ALTER TABLE post
ADD FOREIGN KEY (`userid`)
REFERENCES user(`id`)
ON DELETE CASCADE
ON UPDATE CASCADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment