Created
March 29, 2018 06:13
-
-
Save gilles6/2a81f56418e2dcdd130c400802ecfbed to your computer and use it in GitHub Desktop.
This file contains 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
# ************************************************************ | |
# Sequel Pro SQL dump | |
# Version 4541 | |
# | |
# http://www.sequelpro.com/ | |
# https://github.com/sequelpro/sequelpro | |
# | |
# Host: 127.0.0.1 (MySQL 5.7.20) | |
# Database: test | |
# Generation Time: 2018-03-29 06:11:45 +0000 | |
# ************************************************************ | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; | |
/*!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' */; | |
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; | |
# Dump of table item | |
# ------------------------------------------------------------ | |
DROP TABLE IF EXISTS `item`; | |
CREATE TABLE `item` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`transaction_id` int(11) DEFAULT NULL, | |
`unit_price` int(11) DEFAULT NULL, | |
`quantity` int(11) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
LOCK TABLES `item` WRITE; | |
/*!40000 ALTER TABLE `item` DISABLE KEYS */; | |
INSERT INTO `item` (`id`, `transaction_id`, `unit_price`, `quantity`) | |
VALUES | |
(1,1,10,1), | |
(2,1,20,1), | |
(3,2,30,1), | |
(4,2,40,1), | |
(5,3,50,1), | |
(6,3,60,1), | |
(7,4,70,1), | |
(8,4,80,1); | |
/*!40000 ALTER TABLE `item` ENABLE KEYS */; | |
UNLOCK TABLES; | |
# Dump of table producer | |
# ------------------------------------------------------------ | |
DROP TABLE IF EXISTS `producer`; | |
CREATE TABLE `producer` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
LOCK TABLES `producer` WRITE; | |
/*!40000 ALTER TABLE `producer` DISABLE KEYS */; | |
INSERT INTO `producer` (`id`, `name`) | |
VALUES | |
(1,'foo'), | |
(2,'bar'); | |
/*!40000 ALTER TABLE `producer` ENABLE KEYS */; | |
UNLOCK TABLES; | |
# Dump of table retailer | |
# ------------------------------------------------------------ | |
DROP TABLE IF EXISTS `retailer`; | |
CREATE TABLE `retailer` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
LOCK TABLES `retailer` WRITE; | |
/*!40000 ALTER TABLE `retailer` DISABLE KEYS */; | |
INSERT INTO `retailer` (`id`, `name`) | |
VALUES | |
(1,'baz'), | |
(2,'qux'); | |
/*!40000 ALTER TABLE `retailer` ENABLE KEYS */; | |
UNLOCK TABLES; | |
# Dump of table transaction | |
# ------------------------------------------------------------ | |
DROP TABLE IF EXISTS `transaction`; | |
CREATE TABLE `transaction` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`product` varchar(255) DEFAULT NULL, | |
`supplier_id` int(11) DEFAULT NULL, | |
`supplier_type` varchar(255) DEFAULT NULL, | |
`client_id` int(11) DEFAULT NULL, | |
`client_type` varchar(255) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
LOCK TABLES `transaction` WRITE; | |
/*!40000 ALTER TABLE `transaction` DISABLE KEYS */; | |
INSERT INTO `transaction` (`id`, `product`, `supplier_id`, `supplier_type`, `client_id`, `client_type`) | |
VALUES | |
(1,'a',1,'App\\Producer',1,'App\\Retailer'), | |
(2,'b',2,'App\\Retailer',1,'App\\Retailer'), | |
(3,'c',1,'App\\Producer',2,'App\\Producer'), | |
(4,'d',2,'App\\Retailer',2,'App\\Producer'); | |
/*!40000 ALTER TABLE `transaction` ENABLE KEYS */; | |
UNLOCK TABLES; | |
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | |
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | |
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | |
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment