SHOW:
|
|
- or go back to the newest paste.
| 1 | - | Drop Database If Exists berbatik_java; |
| 1 | + | -- MySQL dump 10.13 Distrib 5.1.61, for debian-linux-gnu (x86_64) |
| 2 | - | Create Database berbatik_java; |
| 2 | + | -- |
| 3 | - | Use berbatik_java; |
| 3 | + | -- Host: localhost Database: berbatik_java |
| 4 | -- ------------------------------------------------------ | |
| 5 | - | Drop Table If Exists booking; |
| 5 | + | -- Server version 5.1.61-0ubuntu0.11.10.1 |
| 6 | - | Create Table booking( |
| 6 | + | |
| 7 | - | booking_id Long Not Null Primary Key, |
| 7 | + | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; |
| 8 | - | person_id Long Not Null, |
| 8 | + | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
| 9 | - | magento_customer_id Int Not Null, |
| 9 | + | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; |
| 10 | - | status Varchar(20), |
| 10 | + | /*!40101 SET NAMES utf8 */; |
| 11 | - | created Date, |
| 11 | + | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
| 12 | - | last_modified Date, |
| 12 | + | /*!40103 SET TIME_ZONE='+00:00' */; |
| 13 | - | sub_total Decimal(15, 2), |
| 13 | + | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; |
| 14 | - | book_count Int, |
| 14 | + | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; |
| 15 | - | decrease_count Int, |
| 15 | + | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; |
| 16 | - | cancel_count Int, |
| 16 | + | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; |
| 17 | - | person_name Varchar(50) |
| 17 | + | |
| 18 | - | ); |
| 18 | + | -- |
| 19 | -- Table structure for table `booking` | |
| 20 | - | Drop Table If Exists detail_booking; |
| 20 | + | -- |
| 21 | - | Create Table detail_booking( |
| 21 | + | |
| 22 | - | booking_id Long Not Null, |
| 22 | + | DROP TABLE IF EXISTS `booking`; |
| 23 | - | product_id Char(10) Not Null, |
| 23 | + | /*!40101 SET @saved_cs_client = @@character_set_client */; |
| 24 | - | magento_product_id Int Not Null, |
| 24 | + | /*!40101 SET character_set_client = utf8 */; |
| 25 | - | shop_id Char(10), |
| 25 | + | CREATE TABLE `booking` ( |
| 26 | - | price Decimal(15, 2), |
| 26 | + | `booking_id` bigint(20) NOT NULL, |
| 27 | - | qty Int, |
| 27 | + | `person_id` varchar(255) NOT NULL, |
| 28 | - | created Date, |
| 28 | + | `magento_customer_id` bigint(20) NOT NULL, |
| 29 | - | last_modified Date, |
| 29 | + | `status` varchar(20) DEFAULT NULL, |
| 30 | - | status Varchar(20), |
| 30 | + | `created` datetime DEFAULT NULL, |
| 31 | - | name Varchar(50), |
| 31 | + | `last_modified` datetime DEFAULT NULL, |
| 32 | - | local_sku Char(10), |
| 32 | + | `subtotal` decimal(15,4) DEFAULT NULL, |
| 33 | - | attibutes Varchar(100), |
| 33 | + | `book_count` int(11) DEFAULT NULL, |
| 34 | - | Constraint Primary Key (booking_id, product_id), |
| 34 | + | `decrease_count` int(11) DEFAULT NULL, |
| 35 | - | Constraint Foreign Key (booking_id) References booking(booking_id) |
| 35 | + | `cancel_count` int(11) DEFAULT NULL, |
| 36 | - | ); |
| 36 | + | `person_name` varchar(255) DEFAULT NULL, |
| 37 | PRIMARY KEY (`booking_id`), | |
| 38 | KEY `person_id` (`person_id`), | |
| 39 | KEY `magento_customer_id` (`magento_customer_id`), | |
| 40 | KEY `status` (`status`) | |
| 41 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
| 42 | /*!40101 SET character_set_client = @saved_cs_client */; | |
| 43 | ||
| 44 | -- | |
| 45 | -- Dumping data for table `booking` | |
| 46 | -- | |
| 47 | ||
| 48 | LOCK TABLES `booking` WRITE; | |
| 49 | /*!40000 ALTER TABLE `booking` DISABLE KEYS */; | |
| 50 | INSERT INTO `booking` VALUES (1,'1',1,'pending','2012-05-21 00:00:00','2012-05-21 00:00:00','55000.0000',2,1,0,''); | |
| 51 | /*!40000 ALTER TABLE `booking` ENABLE KEYS */; | |
| 52 | UNLOCK TABLES; | |
| 53 | ||
| 54 | -- | |
| 55 | -- Table structure for table `booking_detail` | |
| 56 | -- | |
| 57 | ||
| 58 | DROP TABLE IF EXISTS `booking_detail`; | |
| 59 | /*!40101 SET @saved_cs_client = @@character_set_client */; | |
| 60 | /*!40101 SET character_set_client = utf8 */; | |
| 61 | CREATE TABLE `booking_detail` ( | |
| 62 | `booking_detail_id` bigint(20) NOT NULL, | |
| 63 | `booking_id` bigint(20) NOT NULL, | |
| 64 | `product_id` varchar(255) NOT NULL, | |
| 65 | `magento_product_id` bigint(20) NOT NULL, | |
| 66 | `shop_id` varchar(255) DEFAULT NULL, | |
| 67 | `currency_id` char(3) DEFAULT NULL, | |
| 68 | `price` decimal(15,4) DEFAULT NULL, | |
| 69 | `qty` decimal(15,4) DEFAULT NULL, | |
| 70 | `created` datetime DEFAULT NULL, | |
| 71 | `last_modified` datetime DEFAULT NULL, | |
| 72 | `status` varchar(20) DEFAULT NULL, | |
| 73 | `name` varchar(255) DEFAULT NULL, | |
| 74 | `local_sku` varchar(255) DEFAULT NULL, | |
| 75 | `attributes` text, | |
| 76 | PRIMARY KEY (`booking_detail_id`), | |
| 77 | KEY `booking_id` (`booking_id`), | |
| 78 | KEY `product_id` (`product_id`), | |
| 79 | KEY `magento_product_id` (`magento_product_id`), | |
| 80 | KEY `shop_id` (`shop_id`), | |
| 81 | KEY `status` (`status`), | |
| 82 | KEY `local_sku` (`local_sku`), | |
| 83 | KEY `fk_booking_detail_booking_id` (`booking_id`), | |
| 84 | KEY `currency_id` (`currency_id`), | |
| 85 | CONSTRAINT `fk_booking_detail_booking_id` FOREIGN KEY (`booking_id`) REFERENCES `booking` (`booking_id`) ON DELETE CASCADE ON UPDATE CASCADE | |
| 86 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
| 87 | /*!40101 SET character_set_client = @saved_cs_client */; | |
| 88 | ||
| 89 | -- | |
| 90 | -- Dumping data for table `booking_detail` | |
| 91 | -- | |
| 92 | ||
| 93 | LOCK TABLES `booking_detail` WRITE; | |
| 94 | /*!40000 ALTER TABLE `booking_detail` DISABLE KEYS */; | |
| 95 | INSERT INTO `booking_detail` VALUES (0,1,'1',1,'2',NULL,'50000.0000','1.0000','2012-05-21 00:00:00','2012-05-21 00:00:00','confirmed','baju','1',''); | |
| 96 | /*!40000 ALTER TABLE `booking_detail` ENABLE KEYS */; | |
| 97 | UNLOCK TABLES; | |
| 98 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; | |
| 99 | ||
| 100 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | |
| 101 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | |
| 102 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; | |
| 103 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | |
| 104 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | |
| 105 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; | |
| 106 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | |
| 107 | ||
| 108 | -- Dump completed on 2012-05-21 16:06:22 |