Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE DATABASE IF NOT EXISTS `test` /*!40100 DEFAULT CHARACTER SET latin1 */;
- USE `test`;
- -- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64)
- --
- -- Host: localhost Database: test
- -- ------------------------------------------------------
- -- Server version 5.5.31-0ubuntu0.13.04.1
- /*!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 */;
- /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
- /*!40103 SET TIME_ZONE='+00:00' */;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
- /*!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 */;
- --
- -- Table structure for table `transactions`
- --
- DROP TABLE IF EXISTS `transactions`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `transactions` (
- `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `user_id` INT(10) UNSIGNED NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `transactions`
- --
- LOCK TABLES `transactions` WRITE;
- /*!40000 ALTER TABLE `transactions` DISABLE KEYS */;
- INSERT INTO `transactions` VALUES (1,1),(2,1),(3,2),(4,3),(5,4),(6,3),(7,4);
- /*!40000 ALTER TABLE `transactions` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `products`
- --
- DROP TABLE IF EXISTS `products`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `products` (
- `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `name` VARCHAR(45) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `products`
- --
- LOCK TABLES `products` WRITE;
- /*!40000 ALTER TABLE `products` DISABLE KEYS */;
- INSERT INTO `products` VALUES (1,'foo'),(2,'bar'),(3,'Battle Axe'),(4,'T Shirt');
- /*!40000 ALTER TABLE `products` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `users`
- --
- DROP TABLE IF EXISTS `users`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `users` (
- `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `name` VARCHAR(45) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `users`
- --
- LOCK TABLES `users` WRITE;
- /*!40000 ALTER TABLE `users` DISABLE KEYS */;
- INSERT INTO `users` VALUES (1,'Jan'),(2,'Bob'),(3,'Sue'),(4,'Frank');
- /*!40000 ALTER TABLE `users` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `transaction_line`
- --
- DROP TABLE IF EXISTS `transaction_line`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `transaction_line` (
- `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `transaction_id` INT(10) UNSIGNED NOT NULL,
- `product_id` INT(10) UNSIGNED NOT NULL,
- `cost` DECIMAL(2,0) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `transaction_line`
- --
- LOCK TABLES `transaction_line` WRITE;
- /*!40000 ALTER TABLE `transaction_line` DISABLE KEYS */;
- INSERT INTO `transaction_line` VALUES (1,1,1,4),(2,1,2,8),(3,2,1,2),(4,2,3,10),(5,3,4,16),(6,3,3,11),(7,4,4,32),(8,5,1,88),(9,5,2,67),(10,6,3,30),(11,6,4,9),(12,7,2,10),(13,7,4,1);
- /*!40000 ALTER TABLE `transaction_line` ENABLE KEYS */;
- UNLOCK TABLES;
- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_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 */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
- -- Dump completed on 2013-06-05 21:59:02
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement