Last active
January 24, 2017 11:25
-
-
Save robfallows/d42e402c84fcb01c44d56331e1536ac8 to your computer and use it in GitHub Desktop.
for medium article https://medium.com/@robfallows/meteor-promises-fdd1f701caf1#.e6f5jjtb9
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 DATABASE `mordor`; | |
USE `mordor`; | |
CREATE TABLE `hobbits` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `name` (`name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
INSERT INTO `hobbits` VALUES | |
(1, 'Bilbo'), | |
(2, 'Frodo'), | |
(3, 'Smeagol'), | |
(4, 'Sam'); | |
CREATE TABLE `items` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) NOT NULL, | |
`owner` int(11) DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
KEY `name` (`name`), | |
KEY `owner` (`owner`), | |
CONSTRAINT `fk_owner` FOREIGN KEY (`owner`) REFERENCES `hobbits` (`id`) ON DELETE SET NULL ON UPDATE SET NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
INSERT INTO `items` VALUES | |
(1, 'ring', 3); | |
CREATE USER 'sauron'@'localhost' IDENTIFIED BY 'theonetruering'; | |
GRANT ALL ON `mordor`.* TO 'sauron'@'localhost'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment