Advertisement
Guest User

Untitled

a guest
Dec 28th, 2015
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 11.31 KB | None | 0 0
  1. CREATE DATABASE  IF NOT EXISTS `destramic` /*!40100 DEFAULT CHARACTER SET utf8 */;
  2. USE `destramic`;
  3. -- MySQL dump 10.13  Distrib 5.7.9, for Win64 (x86_64)
  4. --
  5. -- Host: localhost    Database: destramic
  6. -- ------------------------------------------------------
  7. -- Server version   5.7.10-log
  8.  
  9. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  10. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  11. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  12. /*!40101 SET NAMES utf8 */;
  13. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  14. /*!40103 SET TIME_ZONE='+00:00' */;
  15. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  16. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  17. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  18. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  19.  
  20. --
  21. -- Table structure for table `categories`
  22. --
  23.  
  24. DROP TABLE IF EXISTS `categories`;
  25. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  26. /*!40101 SET character_set_client = utf8 */;
  27. CREATE TABLE `categories` (
  28.   `category_id` INT(11) NOT NULL AUTO_INCREMENT,
  29.   `name_en` VARCHAR(90) NOT NULL,
  30.   `order_number` INT(11) DEFAULT NULL,
  31.   `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  32.   PRIMARY KEY (`category_id`),
  33.   UNIQUE KEY `categories_category_id_UNIQUE` (`category_id`,`order_number`)
  34. ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf16;
  35. /*!40101 SET character_set_client = @saved_cs_client */;
  36.  
  37. --
  38. -- Dumping data for table `categories`
  39. --
  40.  
  41. LOCK TABLES `categories` WRITE;
  42. /*!40000 ALTER TABLE `categories` DISABLE KEYS */;
  43. INSERT INTO `categories` VALUES (1,'Antiques',1,'2015-01-26 00:00:50');
  44. /*!40000 ALTER TABLE `categories` ENABLE KEYS */;
  45. UNLOCK TABLES;
  46.  
  47. --
  48. -- Table structure for table `category_specifics`
  49. --
  50.  
  51. DROP TABLE IF EXISTS `category_specifics`;
  52. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  53. /*!40101 SET character_set_client = utf8 */;
  54. CREATE TABLE `category_specifics` (
  55.   `category_specific_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  56.   `category_id` INT(11) DEFAULT NULL,
  57.   `specific_id` INT(11) DEFAULT NULL,
  58.   `created` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  59.   PRIMARY KEY (`category_specific_id`),
  60.   UNIQUE KEY `category_specific_id_UNIQUE` (`category_specific_id`)
  61. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  62. /*!40101 SET character_set_client = @saved_cs_client */;
  63.  
  64. --
  65. -- Dumping data for table `category_specifics`
  66. --
  67.  
  68. LOCK TABLES `category_specifics` WRITE;
  69. /*!40000 ALTER TABLE `category_specifics` DISABLE KEYS */;
  70. INSERT INTO `category_specifics` VALUES (2,1,15,'2015-12-28 18:23:52');
  71. /*!40000 ALTER TABLE `category_specifics` ENABLE KEYS */;
  72. UNLOCK TABLES;
  73.  
  74. --
  75. -- Table structure for table `item_specific_values`
  76. --
  77.  
  78. DROP TABLE IF EXISTS `item_specific_values`;
  79. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  80. /*!40101 SET character_set_client = utf8 */;
  81. CREATE TABLE `item_specific_values` (
  82.   `item_specific_value_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  83.   `item_id` VARCHAR(45) DEFAULT NULL,
  84.   `specific_value_id` VARCHAR(45) DEFAULT NULL,
  85.   PRIMARY KEY (`item_specific_value_id`),
  86.   UNIQUE KEY `item_specific_value_id_UNIQUE` (`item_specific_value_id`)
  87. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
  88. /*!40101 SET character_set_client = @saved_cs_client */;
  89.  
  90. --
  91. -- Dumping data for table `item_specific_values`
  92. --
  93.  
  94. LOCK TABLES `item_specific_values` WRITE;
  95. /*!40000 ALTER TABLE `item_specific_values` DISABLE KEYS */;
  96. INSERT INTO `item_specific_values` VALUES (1,'29','1'),(2,'30','2'),(3,'31','3'),(4,'32','1'),(5,'33','2'),(6,'29','4'),(7,'30','5'),(8,'31','4'),(9,'32','5'),(10,'33','4');
  97. /*!40000 ALTER TABLE `item_specific_values` ENABLE KEYS */;
  98. UNLOCK TABLES;
  99.  
  100. --
  101. -- Table structure for table `items`
  102. --
  103.  
  104. DROP TABLE IF EXISTS `items`;
  105. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  106. /*!40101 SET character_set_client = utf8 */;
  107. CREATE TABLE `items` (
  108.   `item_id` INT(11) NOT NULL AUTO_INCREMENT,
  109.   `user_id` INT(11) NOT NULL,
  110.   `category_id` INT(11) NOT NULL,
  111.   `sub_category_id` INT(11) NOT NULL,
  112.   `sub_sub_category_id` INT(11) DEFAULT NULL,
  113.   `sub_sub_sub_category_id` INT(11) DEFAULT NULL,
  114.   `user_address_id` INT(11) DEFAULT NULL,
  115.   `condition_id` INT(11) DEFAULT NULL,
  116.   `title` VARCHAR(90) NOT NULL,
  117.   `description` text NOT NULL,
  118.   `auction` INT(11) NOT NULL,
  119.   `buy_now` tinyint(1) NOT NULL DEFAULT '0',
  120.   `starting_price` DECIMAL(15,2) NOT NULL,
  121.   `listing_duration` enum('1','3','7','10','30') NOT NULL,
  122.   `buy_now_price` DECIMAL(15,2) NOT NULL,
  123.   `quantity` INT(11) NOT NULL DEFAULT '1',
  124.   `offers_accepted` tinyint(1) NOT NULL DEFAULT '0',
  125.   `start_timestamp` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  126.   `dispatch_time` enum('Same Day','1 Working Day','2 Working Days','3 Working Days') NOT NULL,
  127.   `returns` INT(1) NOT NULL DEFAULT '0',
  128.   `return_policy` text,
  129.   `free_delivery` INT(1) DEFAULT '0',
  130.   `free_delivery_condition` enum('Town/City','County','Country','Continent','MENA Region','Worldwide') DEFAULT NULL,
  131.   `collection` INT(1) DEFAULT '0',
  132.   `collection_only` INT(1) DEFAULT '0',
  133.   `created` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  134.   `personal_delivery` INT(1) DEFAULT '0',
  135.   `personal_delivery_distance` INT(10) DEFAULT '0',
  136.   `personal_delivery_price` DECIMAL(12,2) DEFAULT '0.00',
  137.   `draft` INT(1) NOT NULL DEFAULT '0',
  138.   PRIMARY KEY (`item_id`),
  139.   UNIQUE KEY `items_item_id_UNIQUE` (`item_id`),
  140.   KEY `items_user_id_INDEX` (`user_id`),
  141.   KEY `items_category_id_INDEX` (`category_id`),
  142.   KEY `items_sub_category_id_INDEX` (`sub_category_id`),
  143.   KEY `items_user_address_id_INDEX` (`user_address_id`),
  144.   KEY `items_condition_id_INDEX` (`condition_id`),
  145.   FULLTEXT KEY `items_FULLTEXT` (`description`,`title`)
  146. ) ENGINE=InnoDB AUTO_INCREMENT=1243 DEFAULT CHARSET=utf8;
  147. /*!40101 SET character_set_client = @saved_cs_client */;
  148.  
  149. --
  150. -- Dumping data for table `items`
  151. --
  152.  
  153. LOCK TABLES `items` WRITE;
  154. /*!40000 ALTER TABLE `items` DISABLE KEYS */;
  155. INSERT INTO `items` VALUES (29,1,1,4,67,10,1,NULL,'Clock 1','',0,0,0.00,'1',0.00,1,0,'2015-11-15 20:57:50','Same Day',0,NULL,0,NULL,0,0,'2015-11-15 20:57:50',0,0,0.01,1),(30,1,1,4,67,10,2,NULL,'Clock 2','',0,0,0.00,'1',0.00,1,0,'2015-11-15 20:59:13','Same Day',0,NULL,0,NULL,0,0,'2015-11-15 20:59:13',0,0,0.01,1),(31,1,1,4,61,1,1,NULL,'clock 3','',0,0,0.00,'1',0.00,1,0,'2015-11-15 21:10:09','Same Day',0,NULL,0,NULL,0,0,'2015-11-15 21:10:09',0,0,0.01,1),(32,1,1,4,61,2,1,NULL,'clock 4','',0,0,0.00,'1',0.00,1,0,'2015-11-15 21:10:28','Same Day',0,NULL,0,NULL,0,0,'2015-11-15 21:10:28',0,0,0.01,1),(33,1,1,4,63,4,1,NULL,'clock 5','',0,0,0.00,'1',0.00,1,0,'2015-11-15 21:11:03','Same Day',0,NULL,0,NULL,0,0,'2015-11-15 21:11:03',0,0,0.01,1);
  156. /*!40000 ALTER TABLE `items` ENABLE KEYS */;
  157. UNLOCK TABLES;
  158.  
  159. --
  160. -- Table structure for table `specific_values`
  161. --
  162.  
  163. DROP TABLE IF EXISTS `specific_values`;
  164. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  165. /*!40101 SET character_set_client = utf8 */;
  166. CREATE TABLE `specific_values` (
  167.   `specific_value_id` INT(11) NOT NULL AUTO_INCREMENT,
  168.   `specific_id` INT(11) DEFAULT NULL,
  169.   `value` VARCHAR(90) DEFAULT NULL,
  170.   PRIMARY KEY (`specific_value_id`),
  171.   UNIQUE KEY `specific_value_id_UNIQUE` (`specific_value_id`)
  172. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
  173. /*!40101 SET character_set_client = @saved_cs_client */;
  174.  
  175. --
  176. -- Dumping data for table `specific_values`
  177. --
  178.  
  179. LOCK TABLES `specific_values` WRITE;
  180. /*!40000 ALTER TABLE `specific_values` DISABLE KEYS */;
  181. INSERT INTO `specific_values` VALUES (1,15,'Alarm Clock'),(2,15,'Wall Clock'),(3,15,'Cuckoo Clock '),(4,19,'New'),(5,19,'Used');
  182. /*!40000 ALTER TABLE `specific_values` ENABLE KEYS */;
  183. UNLOCK TABLES;
  184.  
  185. --
  186. -- Table structure for table `specifics`
  187. --
  188.  
  189. DROP TABLE IF EXISTS `specifics`;
  190. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  191. /*!40101 SET character_set_client = utf8 */;
  192. CREATE TABLE `specifics` (
  193.   `specific_id` INT(11) NOT NULL AUTO_INCREMENT,
  194.   `name` VARCHAR(40) NOT NULL,
  195.   `description` VARCHAR(90) DEFAULT NULL,
  196.   `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  197.   PRIMARY KEY (`specific_id`),
  198.   UNIQUE KEY `specifics_specific_id_UNIQUE` (`specific_id`)
  199. ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf16;
  200. /*!40101 SET character_set_client = @saved_cs_client */;
  201.  
  202. --
  203. -- Dumping data for table `specifics`
  204. --
  205.  
  206. LOCK TABLES `specifics` WRITE;
  207. /*!40000 ALTER TABLE `specifics` DISABLE KEYS */;
  208. INSERT INTO `specifics` VALUES (15,'Clock Type','Clocks','2015-09-21 19:27:14'),(19,'Condition','Clocks','2015-09-21 19:38:32');
  209. /*!40000 ALTER TABLE `specifics` ENABLE KEYS */;
  210. UNLOCK TABLES;
  211.  
  212. --
  213. -- Table structure for table `sub_categories`
  214. --
  215.  
  216. DROP TABLE IF EXISTS `sub_categories`;
  217. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  218. /*!40101 SET character_set_client = utf8 */;
  219. CREATE TABLE `sub_categories` (
  220.   `sub_category_id` INT(11) NOT NULL AUTO_INCREMENT,
  221.   `category_id` INT(11) NOT NULL,
  222.   `name_en` VARCHAR(90) CHARACTER SET utf8mb4 NOT NULL,
  223.   `order_number` INT(11) DEFAULT NULL,
  224.   `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  225.   PRIMARY KEY (`sub_category_id`),
  226.   UNIQUE KEY `sub_categories_sub_category_id_UNIQUE` (`sub_category_id`),
  227.   KEY `sub_categories_category_id_INDEX` (`category_id`),
  228.   CONSTRAINT `sub_categories_category_id_FOREIGN_KEY` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
  229. ) ENGINE=InnoDB AUTO_INCREMENT=581 DEFAULT CHARSET=utf16;
  230. /*!40101 SET character_set_client = @saved_cs_client */;
  231.  
  232. --
  233. -- Dumping data for table `sub_categories`
  234. --
  235.  
  236. LOCK TABLES `sub_categories` WRITE;
  237. /*!40000 ALTER TABLE `sub_categories` DISABLE KEYS */;
  238. INSERT INTO `sub_categories` VALUES (4,1,'Anitque Clocks',NULL,'2015-09-09 17:11:49');
  239. /*!40000 ALTER TABLE `sub_categories` ENABLE KEYS */;
  240. UNLOCK TABLES;
  241.  
  242. --
  243. -- Table structure for table `sub_category_specifics`
  244. --
  245.  
  246. DROP TABLE IF EXISTS `sub_category_specifics`;
  247. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  248. /*!40101 SET character_set_client = utf8 */;
  249. CREATE TABLE `sub_category_specifics` (
  250.   `sub_category_specific_id` INT(11) NOT NULL AUTO_INCREMENT,
  251.   `sub_category_id` INT(11) DEFAULT NULL,
  252.   `specific_id` INT(11) DEFAULT NULL,
  253.   `created` TIMESTAMP NULL DEFAULT NULL,
  254.   PRIMARY KEY (`sub_category_specific_id`),
  255.   UNIQUE KEY `sub_category_specific_id_UNIQUE` (`sub_category_specific_id`)
  256. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  257. /*!40101 SET character_set_client = @saved_cs_client */;
  258.  
  259. --
  260. -- Dumping data for table `sub_category_specifics`
  261. --
  262.  
  263. LOCK TABLES `sub_category_specifics` WRITE;
  264. /*!40000 ALTER TABLE `sub_category_specifics` DISABLE KEYS */;
  265. INSERT INTO `sub_category_specifics` VALUES (1,4,19,NULL);
  266. /*!40000 ALTER TABLE `sub_category_specifics` ENABLE KEYS */;
  267. UNLOCK TABLES;
  268. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  269.  
  270. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  271. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  272. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  273. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  274. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  275. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  276. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  277.  
  278. -- Dump completed on 2015-12-29  3:52:47
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement