-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimportBdd.sql
More file actions
358 lines (295 loc) · 11.3 KB
/
importBdd.sql
File metadata and controls
358 lines (295 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 26, 2019 at 08:26 PM
-- Server version: 5.7.23
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `projetTransversal`
--
-- --------------------------------------------------------
--
-- Table structure for table `boxes`
--
CREATE TABLE `boxes` (
`id_box` int(11) NOT NULL,
`name` varchar(45) NOT NULL,
`price` float NOT NULL,
`description` text NOT NULL,
`animal` varchar(25) DEFAULT NULL,
`img_name` varchar(50) NOT NULL,
`age` varchar(50) NOT NULL,
`weight` varchar(50) NOT NULL,
`fur` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `boxes`
--
INSERT INTO `boxes` (`id_box`, `name`, `price`, `description`, `animal`, `img_name`, `age`, `weight`, `fur`) VALUES
(1, 'Mousseline de courgettes', 20, 'Une délicieuse recette pour chat à base de courgettes.', 'chat', 'test2.jpg', 'adulte', 'surpoids', 'long'),
(2, 'produit de test', 50, 'un produit pour tester', 'chat', 'test1.jpg', 'bebe', 'normal', 'court'),
(3, 'Lasagnes', 30, 'Un délicieux plat de lasagnes italiennes pour votre chat', 'chat', 'test2.jpg', 'senior', 'surpoids', 'long');
-- --------------------------------------------------------
--
-- Table structure for table `feedbacks`
--
CREATE TABLE `feedbacks` (
`id_feedback` int(11) NOT NULL,
`content` text NOT NULL,
`user_id` int(11) NOT NULL,
`box_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `feedbacks`
--
INSERT INTO `feedbacks` (`id_feedback`, `content`, `user_id`, `box_id`) VALUES
(1, 'test', 7, 1),
(2, 'commentaire de test', 4, 1),
(3, 'excellent produit', 4, 1),
(4, 'j\'adore', 4, 1),
(5, 'j\'adore', 4, 1),
(6, 'j\'adore', 4, 1),
(7, 'j\'adore', 4, 1),
(8, 'j\'adore', 4, 1),
(9, 'j\'adore', 4, 1),
(10, 'j\'adore', 4, 1),
(11, 'j\'adore', 4, 1);
-- --------------------------------------------------------
--
-- Table structure for table `ingredients`
--
CREATE TABLE `ingredients` (
`id_ingredient` int(11) NOT NULL,
`ingredient` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `ingredients`
--
INSERT INTO `ingredients` (`id_ingredient`, `ingredient`) VALUES
(1, 'courgettes'),
(2, 'farine'),
(3, 'ingredientDeTest');
-- --------------------------------------------------------
--
-- Table structure for table `orders`
--
CREATE TABLE `orders` (
`id_order` int(11) NOT NULL,
`status` varchar(45) NOT NULL,
`user_id` int(11) NOT NULL,
`box_id` int(11) NOT NULL,
`adress` text NOT NULL,
`date_of_order` date NOT NULL,
`date_of_deliver` date DEFAULT NULL,
`quantity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `orders`
--
INSERT INTO `orders` (`id_order`, `status`, `user_id`, `box_id`, `adress`, `date_of_order`, `date_of_deliver`, `quantity`) VALUES
(1, 'ordered', 2, 1, 'chez moi', '2019-04-08', NULL, 1),
(2, 'ordered', 2, 1, '35 rue chez moi', '2019-04-08', NULL, 1),
(3, 'ordered', 3, 1, 'adresse de test', '2019-04-24', NULL, 1),
(4, 'ordered', 7, 1, 'adresse de test', '2019-05-24', NULL, 1),
(5, 'ordered', 7, 1, 'adresse de test', '2019-05-24', NULL, 1),
(6, 'ordered', 7, 1, 'adresse de test', '2019-05-24', NULL, 1),
(7, 'ordered', 7, 1, 'adresse de test', '2019-05-24', NULL, 1),
(8, 'ordered', 4, 2, 'adresse', '2019-05-24', NULL, 1),
(9, 'ordered', 4, 1, 'adresse', '2019-05-24', NULL, 1),
(10, 'ordered', 4, 1, '24 rue Henri Martin', '2019-05-24', NULL, 1),
(11, 'ordered', 4, 1, 'adresse', '2019-05-24', NULL, 1),
(12, 'ordered', 4, 1, 'adresse', '2019-05-24', NULL, 1),
(13, 'ordered', 4, 1, '24 rue Henri Martin', '2019-05-24', NULL, 1),
(14, 'ordered', 4, 1, 'adresse', '2019-05-24', NULL, 1),
(15, 'ordered', 4, 1, '', '2019-05-24', NULL, 1),
(16, 'ordered', 4, 1, 'adresse', '2019-05-24', NULL, 1),
(17, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(18, 'ordered', 4, 2, 'adresse', '2019-05-26', NULL, 1),
(19, 'ordered', 4, 2, 'adresse', '2019-05-26', NULL, 1),
(20, 'ordered', 4, 2, 'adresse', '2019-05-26', NULL, 1),
(21, 'ordered', 4, 2, 'adresse', '2019-05-26', NULL, 1),
(22, 'ordered', 4, 2, 'adresse', '2019-05-26', NULL, 1),
(23, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(24, 'ordered', 4, 2, 'adresse', '2019-05-26', NULL, 1),
(25, 'ordered', 4, 2, 'adresse', '2019-05-26', NULL, 1),
(26, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(27, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(28, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(29, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(30, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(31, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(32, 'ordered', 4, 1, '', '2019-05-26', NULL, 1),
(33, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(34, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(35, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(36, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(37, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(38, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(39, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(40, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1),
(41, 'ordered', 4, 1, 'adresse', '2019-05-26', NULL, 1);
-- --------------------------------------------------------
--
-- Table structure for table `recipes`
--
CREATE TABLE `recipes` (
`id_recipe` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`steps` longtext NOT NULL,
`preparation_time` varchar(10) NOT NULL,
`cook_time` varchar(10) NOT NULL,
`difficulty` int(11) NOT NULL,
`id_box` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `recipes`
--
INSERT INTO `recipes` (`id_recipe`, `name`, `steps`, `preparation_time`, `cook_time`, `difficulty`, `id_box`) VALUES
(1, 'Régime pour chat en 5 étapes', 'Laver, égoutter et essuyer les courgettes sans les éplucher\r\nOuvrer chaque courgette en deux dans le sens de la longueur (en 4 longueurs si elle est moyenne), puis couper dans l’autre sens chaque longueur pour obtenir des carrés que je place dans un plat en verre pour micro-ondes.\r\nCouvre le plat en verre avec un couvercle ou un film alimentaire puis le place au micro-ondes, puis sélectionne la puissance maximale et mets à cuire entre 6 et 10 minutes (selon la puissance maximale d’un appareil à un autre). Pour ma part, en vérifiant plusieurs fois en cours de cuisson les morceaux de courgettes avec la pointe d’un couteau, ensuite définir la cuisson à 10 minutes. La courgette doit être tendre et fondante mais pas trop cuite. Il est important de garder le jus de la cuisson dans un verre à part.\r\nVerser dans un mixeur pour réaliser la mousseline de courgettes. Si elle vous semble trop pâteuse ou épaisse, ajoutez le jus pour la rendre plus liquide.\r\nVerser trois bonnes cuillères à soupe (25 g) pour le test et mets le reste en bocaux de verre (refermer aussitôt le bocal, le laisserai refroidir avant de le mettre au congélateur –sortir chaque bocal la veille pour le servir le lendemain après 20 secondes de chauffe au micro-ondes). Il est important de tiédir jusqu’à 38° la mousseline car c’est reproduire la chaleur de la proie lorsque notre chat l’a capturée.', '20min', '10min', 0, 1),
(2, 'test', '1. premiere etape\r\n2. deuxieme etape\r\n3. troisieme etape', '10h', '2h', 0, 2);
-- --------------------------------------------------------
--
-- Table structure for table `recipe_has_ingredients`
--
CREATE TABLE `recipe_has_ingredients` (
`ingredient_id` int(11) NOT NULL,
`recipe_id` int(11) NOT NULL,
`quantity` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `recipe_has_ingredients`
--
INSERT INTO `recipe_has_ingredients` (`ingredient_id`, `recipe_id`, `quantity`) VALUES
(1, 1, '500g');
-- --------------------------------------------------------
--
-- Table structure for table `recipe_has_tools`
--
CREATE TABLE `recipe_has_tools` (
`tool_id` int(11) NOT NULL,
`recipe_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `recipe_has_tools`
--
INSERT INTO `recipe_has_tools` (`tool_id`, `recipe_id`) VALUES
(1, 1),
(2, 1);
-- --------------------------------------------------------
--
-- Table structure for table `tools`
--
CREATE TABLE `tools` (
`id_tool` int(11) NOT NULL,
`tool` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `tools`
--
INSERT INTO `tools` (`id_tool`, `tool`) VALUES
(1, 'micro-ondes'),
(2, 'mixeur');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id_user` int(11) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`points` int(11) DEFAULT NULL,
`admin` tinyint(1) NOT NULL DEFAULT '0',
`name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id_user`, `email`, `password`, `points`, `admin`, `name`) VALUES
(2, 'testUpdate@email.com', 'sha1$8a774da8$1$21ba24b4b67bd451ab15739f80319827c1fe4898', NULL, 0, 'test'),
(4, 'test2@email.com', 'sha1$6f40baca$1$d6e2e6672582598ff74143a1e80cff31b2b10230', NULL, 1, 'test'),
(5, 'test3@email.com', 'sha1$406dc695$1$0b0af95c4756786beb5a0f7606f71e9b8dfe7307', NULL, 0, 'test'),
(6, 'test4@email.com', 'sha1$3dc7dcfa$1$5b1026fb27430c62c5ee41f789495e1e780b1f74', NULL, 0, 'test'),
(7, 'test5@email.com', 'sha1$6f6edf82$1$c8923cefacd34956d5b3f352463f0fbcd2c3aefe', NULL, 0, 'test'),
(14, 'test6@email.com', 'sha1$2b36a70f$1$2b3ef7db63f29f8ee47733607d45abe74d82b75f', NULL, 0, 'test');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `boxes`
--
ALTER TABLE `boxes`
ADD PRIMARY KEY (`id_box`),
ADD UNIQUE KEY `name` (`name`);
--
-- Indexes for table `feedbacks`
--
ALTER TABLE `feedbacks`
ADD PRIMARY KEY (`id_feedback`);
--
-- Indexes for table `ingredients`
--
ALTER TABLE `ingredients`
ADD PRIMARY KEY (`id_ingredient`);
--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`id_order`);
--
-- Indexes for table `recipes`
--
ALTER TABLE `recipes`
ADD PRIMARY KEY (`id_recipe`);
--
-- Indexes for table `tools`
--
ALTER TABLE `tools`
ADD PRIMARY KEY (`id_tool`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id_user`),
ADD UNIQUE KEY `email` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `boxes`
--
ALTER TABLE `boxes`
MODIFY `id_box` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `feedbacks`
--
ALTER TABLE `feedbacks`
MODIFY `id_feedback` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `ingredients`
--
ALTER TABLE `ingredients`
MODIFY `id_ingredient` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `id_order` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;
--
-- AUTO_INCREMENT for table `recipes`
--
ALTER TABLE `recipes`
MODIFY `id_recipe` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `tools`
--
ALTER TABLE `tools`
MODIFY `id_tool` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;