|
@@ -0,0 +1,134 @@
|
|
1
|
+-- MySQL dump 10.18 Distrib 10.3.27-MariaDB, for debian-linux-gnueabihf (armv8l)
|
|
2
|
+--
|
|
3
|
+-- Host: localhost Database: todo_api
|
|
4
|
+-- ------------------------------------------------------
|
|
5
|
+-- Server version 10.3.27-MariaDB-0+deb10u1
|
|
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 utf8mb4 */;
|
|
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 `forecast`
|
|
20
|
+--
|
|
21
|
+
|
|
22
|
+DROP TABLE IF EXISTS `forecast`;
|
|
23
|
+/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
24
|
+/*!40101 SET character_set_client = utf8 */;
|
|
25
|
+CREATE TABLE `forecast` (
|
|
26
|
+ `user` int(11) NOT NULL,
|
|
27
|
+ `ticket` int(10) unsigned NOT NULL,
|
|
28
|
+ `pessimist_forecast` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
29
|
+ `medium_forecast` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
|
30
|
+ `optimist_forecast` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
|
31
|
+ PRIMARY KEY (`user`,`ticket`),
|
|
32
|
+ KEY `ticket` (`ticket`),
|
|
33
|
+ CONSTRAINT `forecast_ibfk_1` FOREIGN KEY (`user`) REFERENCES `users` (`id`),
|
|
34
|
+ CONSTRAINT `forecast_ibfk_2` FOREIGN KEY (`ticket`) REFERENCES `ticket` (`id`)
|
|
35
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
36
|
+/*!40101 SET character_set_client = @saved_cs_client */;
|
|
37
|
+
|
|
38
|
+--
|
|
39
|
+-- Dumping data for table `forecast`
|
|
40
|
+--
|
|
41
|
+
|
|
42
|
+LOCK TABLES `forecast` WRITE;
|
|
43
|
+/*!40000 ALTER TABLE `forecast` DISABLE KEYS */;
|
|
44
|
+/*!40000 ALTER TABLE `forecast` ENABLE KEYS */;
|
|
45
|
+UNLOCK TABLES;
|
|
46
|
+
|
|
47
|
+--
|
|
48
|
+-- Table structure for table `ticket`
|
|
49
|
+--
|
|
50
|
+
|
|
51
|
+DROP TABLE IF EXISTS `ticket`;
|
|
52
|
+/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
53
|
+/*!40101 SET character_set_client = utf8 */;
|
|
54
|
+CREATE TABLE `ticket` (
|
|
55
|
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
56
|
+ `name` varchar(255) NOT NULL,
|
|
57
|
+ `creation_date` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
58
|
+ `modification_date` timestamp NULL DEFAULT NULL,
|
|
59
|
+ `project` int(10) unsigned DEFAULT NULL,
|
|
60
|
+ `done_time` timestamp NULL DEFAULT NULL,
|
|
61
|
+ `description` varchar(255) DEFAULT NULL,
|
|
62
|
+ `author` int(11) DEFAULT NULL,
|
|
63
|
+ PRIMARY KEY (`id`),
|
|
64
|
+ KEY `project` (`project`),
|
|
65
|
+ KEY `ticket_author` (`author`),
|
|
66
|
+ CONSTRAINT `ticket_author` FOREIGN KEY (`author`) REFERENCES `users` (`id`),
|
|
67
|
+ CONSTRAINT `ticket_ibfk_1` FOREIGN KEY (`project`) REFERENCES `ticket` (`id`)
|
|
68
|
+) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4;
|
|
69
|
+/*!40101 SET character_set_client = @saved_cs_client */;
|
|
70
|
+
|
|
71
|
+--
|
|
72
|
+-- Dumping data for table `ticket`
|
|
73
|
+--
|
|
74
|
+
|
|
75
|
+LOCK TABLES `ticket` WRITE;
|
|
76
|
+/*!40000 ALTER TABLE `ticket` DISABLE KEYS */;
|
|
77
|
+INSERT INTO `ticket` VALUES (1,'tests oriented php-api-crud','2021-02-10 18:58:44','0000-00-00 00:00:00',NULL,'0000-00-00 00:00:00','batch of scripts to tests functionnalities for the php-api-crud',1);
|
|
78
|
+/*!40000 ALTER TABLE `ticket` ENABLE KEYS */;
|
|
79
|
+UNLOCK TABLES;
|
|
80
|
+
|
|
81
|
+--
|
|
82
|
+-- Table structure for table `users`
|
|
83
|
+--
|
|
84
|
+
|
|
85
|
+DROP TABLE IF EXISTS `user`;
|
|
86
|
+/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
87
|
+/*!40101 SET character_set_client = utf8 */;
|
|
88
|
+CREATE TABLE `user` (
|
|
89
|
+ `id` int(11) NOT NULL AUTO_INCREMENT,
|
|
90
|
+ `username` varchar(255) NOT NULL,
|
|
91
|
+ `password` varchar(255) NOT NULL,
|
|
92
|
+ PRIMARY KEY (`id`)
|
|
93
|
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
|
94
|
+/*!40101 SET character_set_client = @saved_cs_client */;
|
|
95
|
+
|
|
96
|
+--
|
|
97
|
+-- Dumping data for table `users`
|
|
98
|
+--
|
|
99
|
+
|
|
100
|
+LOCK TABLES `user` WRITE;
|
|
101
|
+/*!40000 ALTER TABLE `users` DISABLE KEYS */;
|
|
102
|
+INSERT INTO `user` VALUES (1,'nas','jJU6TkYuHMdAQ'),(2,'anon','murmure'),(3,'adminitrateur','$2y$10$1GqKFWKC4vchHqgf7qvyv.NA7VKyAjLfdkyjU5eZ9Wj.TbPBelaiW');
|
|
103
|
+/*!40000 ALTER TABLE `users` ENABLE KEYS */;
|
|
104
|
+UNLOCK TABLES;
|
|
105
|
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
106
|
+
|
|
107
|
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
108
|
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
109
|
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
110
|
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
111
|
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
112
|
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
113
|
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
114
|
+
|
|
115
|
+-- Dump completed on 2021-03-09 19:22:11
|
|
116
|
+
|
|
117
|
+-- Dev staging --
|
|
118
|
+--
|
|
119
|
+-- Table structure for table `users`
|
|
120
|
+--
|
|
121
|
+
|
|
122
|
+DROP TABLE IF EXISTS `assignment`;
|
|
123
|
+/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
124
|
+/*!40101 SET character_set_client = utf8 */;
|
|
125
|
+CREATE TABLE `assignment` (
|
|
126
|
+ `user` int(11) NOT NULL,
|
|
127
|
+ `ticket` int(11) NOT NULL,
|
|
128
|
+ `assigned` timestamp DEFAULT CURRENT_TIMESTAMP,
|
|
129
|
+ `minutesSpent` int(11),
|
|
130
|
+ PRIMARY KEY (`id`, `ticket`),
|
|
131
|
+ FOREIGN KEY (`user`) REFERENCES user(`id`),
|
|
132
|
+ FOREIGN KEY (`ticket`) REFERENCES ticket(`id`)
|
|
133
|
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
|
134
|
+/*!40101 SET character_set_client = @saved_cs_client */;
|