Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@gpickin
Created October 2, 2019 17:42
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 gpickin/1b21fae5acc4e0c19354011496cd8a77 to your computer and use it in GitHub Desktop.
Save gpickin/1b21fae5acc4e0c19354011496cd8a77 to your computer and use it in GitHub Desktop.
MySQL Db for SoapBox Demo for CF Summit 2019 Presentation
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.12 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.5.0.5196
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping structure for table soapbox_cfsummit.bumps
CREATE TABLE IF NOT EXISTS `bumps` (
`userId` int(10) unsigned NOT NULL,
`rantId` int(10) unsigned NOT NULL,
PRIMARY KEY (`userId`,`rantId`),
KEY `fk_bumps_rantId` (`rantId`),
CONSTRAINT `fk_bumps_rantId` FOREIGN KEY (`rantId`) REFERENCES `rants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_bumps_userId` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table soapbox_cfsummit.bumps: ~1 rows (approximately)
/*!40000 ALTER TABLE `bumps` DISABLE KEYS */;
INSERT INTO `bumps` (`userId`, `rantId`) VALUES
(8, 1),
(8, 2);
/*!40000 ALTER TABLE `bumps` ENABLE KEYS */;
-- Dumping structure for table soapbox_cfsummit.cfmigrations
CREATE TABLE IF NOT EXISTS `cfmigrations` (
`name` varchar(190) NOT NULL,
`migration_ran` datetime NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table soapbox_cfsummit.cfmigrations: ~4 rows (approximately)
/*!40000 ALTER TABLE `cfmigrations` DISABLE KEYS */;
INSERT INTO `cfmigrations` (`name`, `migration_ran`) VALUES
('2018_09_23_221203_create_users_table', '2018-09-24 09:01:48'),
('2018_09_24_111920_create_rants_table', '2018-09-24 11:21:19'),
('2018_09_28_133353_create_bumps_table', '2018-09-28 13:34:57'),
('2018_09_28_133432_create_poops_table', '2018-09-28 13:34:57');
/*!40000 ALTER TABLE `cfmigrations` ENABLE KEYS */;
-- Dumping structure for table soapbox_cfsummit.poops
CREATE TABLE IF NOT EXISTS `poops` (
`userId` int(10) unsigned NOT NULL,
`rantId` int(10) unsigned NOT NULL,
PRIMARY KEY (`userId`,`rantId`),
KEY `fk_poops_rantId` (`rantId`),
CONSTRAINT `fk_poops_rantId` FOREIGN KEY (`rantId`) REFERENCES `rants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_poops_userId` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table soapbox_cfsummit.poops: ~0 rows (approximately)
/*!40000 ALTER TABLE `poops` DISABLE KEYS */;
INSERT INTO `poops` (`userId`, `rantId`) VALUES
(8, 2),
(8, 3);
/*!40000 ALTER TABLE `poops` ENABLE KEYS */;
-- Dumping structure for table soapbox_cfsummit.rants
CREATE TABLE IF NOT EXISTS `rants` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`body` text NOT NULL,
`createdDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modifiedDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`userId` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_rants_userId` (`userId`),
CONSTRAINT `fk_rants_userId` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- Dumping data for table soapbox_cfsummit.rants: ~2 rows (approximately)
/*!40000 ALTER TABLE `rants` DISABLE KEYS */;
INSERT INTO `rants` (`id`, `body`, `createdDate`, `modifiedDate`, `userId`) VALUES
(1, '', '2018-09-24 12:00:09', '2018-09-24 12:00:10', 2),
(2, 'sxwsxw', '2018-09-24 12:00:14', '2018-09-24 12:00:14', 2),
(3, 'test', '2019-09-30 10:20:15', '2019-09-30 10:20:15', 8);
/*!40000 ALTER TABLE `rants` ENABLE KEYS */;
-- Dumping structure for table soapbox_cfsummit.users
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`createdDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modifiedDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
-- Dumping data for table soapbox_cfsummit.users: ~6 rows (approximately)
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` (`id`, `username`, `email`, `password`, `createdDate`, `modifiedDate`) VALUES
(2, 'gavin', 'gavin@ortussolutions.com', '$2a$12$.zHTcffL9AbHkWNIXPGKVO5H8Yws6n927Vwq7HTKUM/01Vx7yI6vG', '2018-09-24 09:38:13', '2018-09-24 09:38:13'),
(3, 'gpickin', 'gpickin@gmail.com', '$2a$12$i4bLqCvGK9KTsLF5ivW5a.awOQu9LoMTxTZ4/oG3o3FO675P69zES', '2018-09-24 09:39:04', '2018-09-24 09:39:04'),
(4, 'mpickin', 'mpickin@gmail.com', '$2a$12$xPnkMf57zfNWPES8behTdeKX8IDPwqGgF6MOEk3wrJncPLE7pP6gO', '2018-09-24 09:40:06', '2018-09-24 09:40:06'),
(5, 'test', 'test@test.com', '$2a$12$gfM7oQuZbpDEFf/tj.5MSuUEzE4QF2vF3aYagVavQHCHpUwEGy/qe', '2018-09-24 09:40:28', '2018-09-24 09:40:28'),
(8, 'test2', 'test2@test.com', '$2a$12$pzwDctiyxRTNsJyx0HeAcuxXHkNZEPHuiIHEI20Vaki1rjdUQAdNW', '2019-09-30 09:49:03', '2019-09-30 09:49:03');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment