· 6 years ago · Jun 03, 2019, 02:37 PM
1-- MySQL dump 10.13 Distrib 5.7.20, for osx10.12 (x86_64)
2--
3-- Host: 127.0.0.1 Database: pricing2pl
4-- ------------------------------------------------------
5-- Server version 5.7.26
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `configuration`
20--
21
22DROP TABLE IF EXISTS `configuration`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `configuration` (
26 `name` varchar(255) NOT NULL,
27 `value` varchar(255) NOT NULL,
28 PRIMARY KEY (`name`)
29) ENGINE=InnoDB DEFAULT CHARSET=latin1;
30/*!40101 SET character_set_client = @saved_cs_client */;
31
32--
33-- Dumping data for table `configuration`
34--
35
36LOCK TABLES `configuration` WRITE;
37/*!40000 ALTER TABLE `configuration` DISABLE KEYS */;
38INSERT INTO `configuration` VALUES ('flyinThreshold','1500');
39/*!40000 ALTER TABLE `configuration` ENABLE KEYS */;
40UNLOCK TABLES;
41
42--
43-- Table structure for table `country`
44--
45
46DROP TABLE IF EXISTS `country`;
47/*!40101 SET @saved_cs_client = @@character_set_client */;
48/*!40101 SET character_set_client = utf8 */;
49CREATE TABLE `country` (
50 `code` char(2) NOT NULL,
51 `nationality` varchar(255) NOT NULL,
52 `label` varchar(255) NOT NULL,
53 PRIMARY KEY (`code`)
54) ENGINE=InnoDB DEFAULT CHARSET=latin1;
55/*!40101 SET character_set_client = @saved_cs_client */;
56
57--
58-- Dumping data for table `country`
59--
60
61LOCK TABLES `country` WRITE;
62/*!40000 ALTER TABLE `country` DISABLE KEYS */;
63INSERT INTO `country` VALUES ('FR','Fr','Fr'),('IT','It','It');
64/*!40000 ALTER TABLE `country` ENABLE KEYS */;
65UNLOCK TABLES;
66
67--
68-- Table structure for table `flyin_deduction`
69--
70
71DROP TABLE IF EXISTS `flyin_deduction`;
72/*!40101 SET @saved_cs_client = @@character_set_client */;
73/*!40101 SET character_set_client = utf8 */;
74CREATE TABLE `flyin_deduction` (
75 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
76 `country` char(2) NOT NULL,
77 `vehicle_type` int(10) unsigned NOT NULL,
78 `movement_type` int(10) unsigned NOT NULL,
79 `price` float NOT NULL,
80 PRIMARY KEY (`id`),
81 KEY `fk_flyin_price_1` (`movement_type`),
82 KEY `fk_flyin_price_2` (`vehicle_type`),
83 KEY `fk_flyin_price_3` (`country`),
84 CONSTRAINT `fk_flyin_price_1` FOREIGN KEY (`movement_type`) REFERENCES `movement_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
85 CONSTRAINT `fk_flyin_price_2` FOREIGN KEY (`vehicle_type`) REFERENCES `vehicle_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
86 CONSTRAINT `fk_flyin_price_3` FOREIGN KEY (`country`) REFERENCES `country` (`code`) ON DELETE CASCADE ON UPDATE CASCADE
87) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
88/*!40101 SET character_set_client = @saved_cs_client */;
89
90--
91-- Dumping data for table `flyin_deduction`
92--
93
94LOCK TABLES `flyin_deduction` WRITE;
95/*!40000 ALTER TABLE `flyin_deduction` DISABLE KEYS */;
96INSERT INTO `flyin_deduction` VALUES (1,'FR',1,1,0.12);
97/*!40000 ALTER TABLE `flyin_deduction` ENABLE KEYS */;
98UNLOCK TABLES;
99
100--
101-- Table structure for table `fuel_tax`
102--
103
104DROP TABLE IF EXISTS `fuel_tax`;
105/*!40101 SET @saved_cs_client = @@character_set_client */;
106/*!40101 SET character_set_client = utf8 */;
107CREATE TABLE `fuel_tax` (
108 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
109 `supplier_country` char(2) NOT NULL,
110 `month` tinyint(4) NOT NULL,
111 `year` smallint(6) NOT NULL,
112 `percentage` decimal(7,6) NOT NULL,
113 PRIMARY KEY (`id`),
114 UNIQUE KEY `unique_fuel_tax_1` (`supplier_country`,`month`,`year`),
115 KEY `fk_fuel_tax_1` (`supplier_country`),
116 CONSTRAINT `fk_fuel_tax_1` FOREIGN KEY (`supplier_country`) REFERENCES `country` (`code`) ON DELETE CASCADE ON UPDATE CASCADE
117) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
118/*!40101 SET character_set_client = @saved_cs_client */;
119
120--
121-- Dumping data for table `fuel_tax`
122--
123
124LOCK TABLES `fuel_tax` WRITE;
125/*!40000 ALTER TABLE `fuel_tax` DISABLE KEYS */;
126INSERT INTO `fuel_tax` VALUES (1,'FR',5,2019,0.000200);
127/*!40000 ALTER TABLE `fuel_tax` ENABLE KEYS */;
128UNLOCK TABLES;
129
130--
131-- Table structure for table `kilometer_price`
132--
133
134DROP TABLE IF EXISTS `kilometer_price`;
135/*!40101 SET @saved_cs_client = @@character_set_client */;
136/*!40101 SET character_set_client = utf8 */;
137CREATE TABLE `kilometer_price` (
138 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
139 `supplier_country` char(2) NOT NULL,
140 `country` char(2) NOT NULL,
141 `vehicle_type` int(10) unsigned NOT NULL,
142 `movement_type` int(10) unsigned NOT NULL,
143 `price` decimal(7,3) NOT NULL,
144 `include_ptv_tolls` tinyint(4) NOT NULL DEFAULT '0',
145 `tolls_included` tinyint(4) NOT NULL DEFAULT '0',
146 `pay_to` tinyint(10) DEFAULT NULL,
147 `range` tinyint(10) DEFAULT NULL,
148 PRIMARY KEY (`id`),
149 KEY `fk_kilometer_price_1` (`supplier_country`),
150 KEY `fk_kilometer_price_2` (`country`),
151 KEY `fk_kilometer_price_3` (`vehicle_type`),
152 KEY `fk_kilometer_price_4` (`movement_type`),
153 KEY `fk_kilometer_price_5` (`range`),
154 KEY `fk_kilometer_price_6` (`pay_to`),
155 CONSTRAINT `fk_kilometer_price_1` FOREIGN KEY (`supplier_country`) REFERENCES `country` (`code`) ON DELETE CASCADE ON UPDATE CASCADE,
156 CONSTRAINT `fk_kilometer_price_2` FOREIGN KEY (`country`) REFERENCES `country` (`code`) ON DELETE CASCADE ON UPDATE CASCADE,
157 CONSTRAINT `fk_kilometer_price_3` FOREIGN KEY (`vehicle_type`) REFERENCES `vehicle_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
158 CONSTRAINT `fk_kilometer_price_4` FOREIGN KEY (`movement_type`) REFERENCES `movement_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
159) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;
160/*!40101 SET character_set_client = @saved_cs_client */;
161
162--
163-- Dumping data for table `kilometer_price`
164--
165
166LOCK TABLES `kilometer_price` WRITE;
167/*!40000 ALTER TABLE `kilometer_price` DISABLE KEYS */;
168INSERT INTO `kilometer_price` VALUES (16,'FR','FR',1,1,2.000,0,0,2,10),(18,'FR','FR',1,1,2.000,0,0,2,22);
169/*!40000 ALTER TABLE `kilometer_price` ENABLE KEYS */;
170UNLOCK TABLES;
171
172--
173-- Table structure for table `migrations`
174--
175
176DROP TABLE IF EXISTS `migrations`;
177/*!40101 SET @saved_cs_client = @@character_set_client */;
178/*!40101 SET character_set_client = utf8 */;
179CREATE TABLE `migrations` (
180 `version` bigint(20) NOT NULL,
181 `migration_name` varchar(100) DEFAULT NULL,
182 `start_time` timestamp NULL DEFAULT NULL,
183 `end_time` timestamp NULL DEFAULT NULL,
184 `breakpoint` tinyint(1) NOT NULL DEFAULT '0',
185 PRIMARY KEY (`version`)
186) ENGINE=InnoDB DEFAULT CHARSET=utf8;
187/*!40101 SET character_set_client = @saved_cs_client */;
188
189--
190-- Dumping data for table `migrations`
191--
192
193LOCK TABLES `migrations` WRITE;
194/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
195INSERT INTO `migrations` VALUES (20171129141002,'Pricing2plMigration','2019-05-20 08:12:52','2019-05-20 08:12:52',0),(20180917115002,'AddPtvTolls','2019-05-20 08:12:52','2019-05-20 08:12:52',0),(20180928141002,'AddFlyinDeduction','2019-05-20 08:12:52','2019-05-20 08:12:52',0),(20181204150000,'SpecificCostRadius','2019-05-20 08:12:52','2019-05-20 08:12:52',0),(20190116150601,'DuplicateEuropeSpecialCost','2019-05-20 08:12:52','2019-05-20 08:12:52',0),(20190220093002,'AddTollsIncluded','2019-05-20 08:12:52','2019-05-20 08:12:52',0),(20190527093107,'FeaturePayto','2019-06-03 11:55:01','2019-06-03 11:55:02',0);
196/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
197UNLOCK TABLES;
198
199--
200-- Table structure for table `movement_type`
201--
202
203DROP TABLE IF EXISTS `movement_type`;
204/*!40101 SET @saved_cs_client = @@character_set_client */;
205/*!40101 SET character_set_client = utf8 */;
206CREATE TABLE `movement_type` (
207 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
208 `code` varchar(255) NOT NULL,
209 `label` varchar(255) NOT NULL,
210 PRIMARY KEY (`id`),
211 UNIQUE KEY `unique_movement_type_1` (`code`)
212) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
213/*!40101 SET character_set_client = @saved_cs_client */;
214
215--
216-- Dumping data for table `movement_type`
217--
218
219LOCK TABLES `movement_type` WRITE;
220/*!40000 ALTER TABLE `movement_type` DISABLE KEYS */;
221INSERT INTO `movement_type` VALUES (1,'2','Loaded'),(2,'3','Flyin'),(3,'5','Deadhead');
222/*!40000 ALTER TABLE `movement_type` ENABLE KEYS */;
223UNLOCK TABLES;
224
225--
226-- Table structure for table `pay_to`
227--
228
229DROP TABLE IF EXISTS `pay_to`;
230/*!40101 SET @saved_cs_client = @@character_set_client */;
231/*!40101 SET character_set_client = utf8 */;
232CREATE TABLE `pay_to` (
233 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
234 `code` char(50) NOT NULL,
235 PRIMARY KEY (`id`)
236) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
237/*!40101 SET character_set_client = @saved_cs_client */;
238
239--
240-- Dumping data for table `pay_to`
241--
242
243LOCK TABLES `pay_to` WRITE;
244/*!40000 ALTER TABLE `pay_to` DISABLE KEYS */;
245INSERT INTO `pay_to` VALUES (2,'SUPERCODE2');
246/*!40000 ALTER TABLE `pay_to` ENABLE KEYS */;
247UNLOCK TABLES;
248
249--
250-- Table structure for table `ranges`
251--
252
253DROP TABLE IF EXISTS `ranges`;
254/*!40101 SET @saved_cs_client = @@character_set_client */;
255/*!40101 SET character_set_client = utf8 */;
256CREATE TABLE `ranges` (
257 `id` int(10) NOT NULL AUTO_INCREMENT,
258 `vehicle_type` int(10) unsigned NOT NULL,
259 `pay_to` int(10) unsigned NOT NULL,
260 `movement_type` int(10) unsigned NOT NULL,
261 `limit_left` int(10) unsigned NOT NULL,
262 `limit_right` int(10) unsigned NOT NULL,
263 PRIMARY KEY (`id`),
264 UNIQUE KEY `unique_range_1` (`vehicle_type`,`pay_to`,`movement_type`,`limit_left`,`limit_right`),
265 KEY `fk_range_1` (`vehicle_type`),
266 KEY `fk_range_2` (`pay_to`),
267 KEY `fk_range_3` (`movement_type`),
268 CONSTRAINT `fk_range_1` FOREIGN KEY (`vehicle_type`) REFERENCES `vehicle_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
269 CONSTRAINT `fk_range_2` FOREIGN KEY (`pay_to`) REFERENCES `pay_to` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
270 CONSTRAINT `fk_range_3` FOREIGN KEY (`movement_type`) REFERENCES `movement_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
271) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;
272/*!40101 SET character_set_client = @saved_cs_client */;
273
274--
275-- Dumping data for table `ranges`
276--
277
278LOCK TABLES `ranges` WRITE;
279/*!40000 ALTER TABLE `ranges` DISABLE KEYS */;
280/*!40000 ALTER TABLE `ranges` ENABLE KEYS */;
281UNLOCK TABLES;
282
283--
284-- Table structure for table `specific_cost_price`
285--
286
287DROP TABLE IF EXISTS `specific_cost_price`;
288/*!40101 SET @saved_cs_client = @@character_set_client */;
289/*!40101 SET character_set_client = utf8 */;
290CREATE TABLE `specific_cost_price` (
291 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
292 `supplier_country` char(2) NOT NULL,
293 `vehicle_type` int(10) unsigned NOT NULL,
294 `specific_cost_type` int(10) unsigned NOT NULL,
295 `years` tinyint(4) NOT NULL DEFAULT '0',
296 `months` tinyint(4) NOT NULL DEFAULT '0',
297 `weeks` tinyint(4) NOT NULL DEFAULT '0',
298 `days` smallint(6) NOT NULL DEFAULT '0',
299 `hours` tinyint(4) NOT NULL DEFAULT '0',
300 `minutes` tinyint(4) NOT NULL DEFAULT '0',
301 `price` decimal(7,3) NOT NULL,
302 `address` int(11) NOT NULL DEFAULT '0',
303 `radius` int(11) NOT NULL DEFAULT '0',
304 PRIMARY KEY (`id`),
305 UNIQUE KEY `unique_specific_cost_price_1` (`supplier_country`,`vehicle_type`,`specific_cost_type`,`years`,`months`,`days`,`hours`,`minutes`),
306 KEY `fk_specific_cost_price_1` (`supplier_country`),
307 KEY `fk_specific_cost_price_2` (`vehicle_type`),
308 KEY `fk_specific_cost_price_3` (`specific_cost_type`),
309 CONSTRAINT `fk_specific_cost_price_1` FOREIGN KEY (`supplier_country`) REFERENCES `country` (`code`) ON DELETE CASCADE ON UPDATE CASCADE,
310 CONSTRAINT `fk_specific_cost_price_2` FOREIGN KEY (`vehicle_type`) REFERENCES `vehicle_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
311 CONSTRAINT `fk_specific_cost_price_3` FOREIGN KEY (`specific_cost_type`) REFERENCES `specific_cost_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
312) ENGINE=InnoDB DEFAULT CHARSET=latin1;
313/*!40101 SET character_set_client = @saved_cs_client */;
314
315--
316-- Dumping data for table `specific_cost_price`
317--
318
319LOCK TABLES `specific_cost_price` WRITE;
320/*!40000 ALTER TABLE `specific_cost_price` DISABLE KEYS */;
321/*!40000 ALTER TABLE `specific_cost_price` ENABLE KEYS */;
322UNLOCK TABLES;
323
324--
325-- Table structure for table `specific_cost_type`
326--
327
328DROP TABLE IF EXISTS `specific_cost_type`;
329/*!40101 SET @saved_cs_client = @@character_set_client */;
330/*!40101 SET character_set_client = utf8 */;
331CREATE TABLE `specific_cost_type` (
332 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
333 `code` varchar(255) NOT NULL,
334 `label` varchar(255) NOT NULL,
335 PRIMARY KEY (`id`)
336) ENGINE=InnoDB DEFAULT CHARSET=latin1;
337/*!40101 SET character_set_client = @saved_cs_client */;
338
339--
340-- Dumping data for table `specific_cost_type`
341--
342
343LOCK TABLES `specific_cost_type` WRITE;
344/*!40000 ALTER TABLE `specific_cost_type` DISABLE KEYS */;
345/*!40000 ALTER TABLE `specific_cost_type` ENABLE KEYS */;
346UNLOCK TABLES;
347
348--
349-- Table structure for table `vehicle_type`
350--
351
352DROP TABLE IF EXISTS `vehicle_type`;
353/*!40101 SET @saved_cs_client = @@character_set_client */;
354/*!40101 SET character_set_client = utf8 */;
355CREATE TABLE `vehicle_type` (
356 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
357 `code` varchar(255) NOT NULL,
358 `label` varchar(255) NOT NULL,
359 PRIMARY KEY (`id`),
360 UNIQUE KEY `unique_vehicle_type_1` (`code`)
361) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
362/*!40101 SET character_set_client = @saved_cs_client */;
363
364--
365-- Dumping data for table `vehicle_type`
366--
367
368LOCK TABLES `vehicle_type` WRITE;
369/*!40000 ALTER TABLE `vehicle_type` DISABLE KEYS */;
370INSERT INTO `vehicle_type` VALUES (1,'FRG2','Frg2');
371/*!40000 ALTER TABLE `vehicle_type` ENABLE KEYS */;
372UNLOCK TABLES;
373
374--
375-- Table structure for table `vignette_price`
376--
377
378DROP TABLE IF EXISTS `vignette_price`;
379/*!40101 SET @saved_cs_client = @@character_set_client */;
380/*!40101 SET character_set_client = utf8 */;
381CREATE TABLE `vignette_price` (
382 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
383 `supplier_country` char(2) NOT NULL,
384 `vehicle_type` int(10) unsigned NOT NULL,
385 `country` char(2) NOT NULL,
386 `years` tinyint(4) NOT NULL DEFAULT '0',
387 `months` tinyint(4) NOT NULL DEFAULT '0',
388 `weeks` tinyint(4) NOT NULL DEFAULT '0',
389 `days` smallint(6) NOT NULL DEFAULT '0',
390 `hours` tinyint(4) NOT NULL DEFAULT '0',
391 `minutes` tinyint(4) NOT NULL DEFAULT '0',
392 `price` decimal(7,3) NOT NULL,
393 PRIMARY KEY (`id`),
394 UNIQUE KEY `unique_vignette_price_1` (`supplier_country`,`vehicle_type`,`country`,`years`,`months`,`days`,`hours`,`minutes`),
395 KEY `fk_vignette_price_1` (`supplier_country`),
396 KEY `fk_vignette_price_2` (`vehicle_type`),
397 KEY `fk_vignette_price_3` (`country`),
398 CONSTRAINT `fk_vignette_price_1` FOREIGN KEY (`supplier_country`) REFERENCES `country` (`code`) ON DELETE CASCADE ON UPDATE CASCADE,
399 CONSTRAINT `fk_vignette_price_2` FOREIGN KEY (`vehicle_type`) REFERENCES `vehicle_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
400 CONSTRAINT `fk_vignette_price_3` FOREIGN KEY (`country`) REFERENCES `country` (`code`) ON DELETE CASCADE ON UPDATE CASCADE
401) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
402/*!40101 SET character_set_client = @saved_cs_client */;
403
404--
405-- Dumping data for table `vignette_price`
406--
407
408LOCK TABLES `vignette_price` WRITE;
409/*!40000 ALTER TABLE `vignette_price` DISABLE KEYS */;
410INSERT INTO `vignette_price` VALUES (1,'FR',1,'IT',0,0,0,0,0,0,51.000),(2,'FR',1,'FR',0,0,0,0,0,0,33.000);
411/*!40000 ALTER TABLE `vignette_price` ENABLE KEYS */;
412UNLOCK TABLES;
413/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
414
415/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
416/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
417/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
418/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
419/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
420/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
421/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
422
423-- Dump completed on 2019-06-03 16:16:34