· 6 years ago · May 23, 2019, 12:06 PM
1# ************************************************************
2# Sequel Pro SQL dump
3# Version 4541
4#
5# http://www.sequelpro.com/
6# https://github.com/sequelpro/sequelpro
7#
8# Host: 127.0.0.1 (MySQL 5.7.25-0ubuntu0.16.04.2)
9# Database: phoenix_api
10# Generation Time: 2019-04-19 07:35:20 +0000
11# ************************************************************
12
13
14/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17/*!40101 SET NAMES utf8 */;
18/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
19/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
20/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
21
22
23# Dump of table app_release
24# ------------------------------------------------------------
25
26DROP TABLE IF EXISTS `app_release`;
27
28CREATE TABLE `app_release` (
29 `id` int(11) NOT NULL AUTO_INCREMENT,
30 `version` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
31 `releaseDate` datetime NOT NULL,
32 PRIMARY KEY (`id`)
33) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
34
35
36# Dump of table asset
37# ------------------------------------------------------------
38
39DROP TABLE IF EXISTS `asset`;
40
41CREATE TABLE `asset` (
42 `id` int(11) NOT NULL AUTO_INCREMENT,
43 `creator_id` int(11) DEFAULT NULL,
44 `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
45 `createdDate` datetime NOT NULL,
46 `updatedDate` datetime DEFAULT NULL,
47 `mimeType` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
48 PRIMARY KEY (`id`),
49 KEY `IDX_2AF5A5C61220EA6` (`creator_id`),
50 CONSTRAINT `FK_2AF5A5C61220EA6` FOREIGN KEY (`creator_id`) REFERENCES `employee` (`id`)
51) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
52
53# Dump of table client
54# ------------------------------------------------------------
55
56DROP TABLE IF EXISTS `client`;
57
58CREATE TABLE `client` (
59 `id` int(11) NOT NULL AUTO_INCREMENT,
60 `name` varchar(140) COLLATE utf8_unicode_ci NOT NULL,
61 `street` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
62 `zipcode` varchar(4) COLLATE utf8_unicode_ci DEFAULT NULL,
63 `city` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
64 `crmCode` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
65 `account_manager_id` int(11) DEFAULT NULL,
66 `created_date` datetime NOT NULL,
67 `updated_date` datetime DEFAULT NULL,
68 `last_import_on` datetime DEFAULT NULL,
69 PRIMARY KEY (`id`),
70 UNIQUE KEY `UNIQ_C7440455F619D68A` (`crmCode`),
71 KEY `IDX_C744045584A5C6C7` (`account_manager_id`),
72 CONSTRAINT `FK_C744045584A5C6C7` FOREIGN KEY (`account_manager_id`) REFERENCES `employee` (`id`)
73) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
74
75# Dump of table contact_person
76# ------------------------------------------------------------
77
78DROP TABLE IF EXISTS `contact_person`;
79
80CREATE TABLE `contact_person` (
81 `id` int(11) NOT NULL AUTO_INCREMENT,
82 `company_id` int(11) DEFAULT NULL,
83 `firstname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
84 `lastname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
85 `email` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
86 `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
87 `language_id` int(11) DEFAULT NULL,
88 `street` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
89 `zipcode` varchar(4) COLLATE utf8_unicode_ci DEFAULT NULL,
90 `city` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
91 `crm_code` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
92 `saluation` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
93 `created_date` datetime NOT NULL,
94 `updated_date` datetime DEFAULT NULL,
95 `last_imported_on` datetime DEFAULT NULL,
96 `deleted_on` datetime DEFAULT NULL,
97 `phoneAlternative1` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
98 `phoneAlternative2` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
99 `function` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
100 PRIMARY KEY (`id`),
101 KEY `IDX_A44EE6F7979B1AD6` (`company_id`),
102 KEY `IDX_A44EE6F782F1BAF4` (`language_id`),
103 FULLTEXT KEY `IDX_A44EE6F783A00E683124B5B6` (`firstname`,`lastname`),
104 CONSTRAINT `FK_A44EE6F782F1BAF4` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`),
105 CONSTRAINT `FK_A44EE6F7979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `client` (`id`)
106) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
107
108# Dump of table contact_persons_attachments
109# ------------------------------------------------------------
110
111DROP TABLE IF EXISTS `contact_persons_attachments`;
112
113CREATE TABLE `contact_persons_attachments` (
114 `contact_person_id` int(11) NOT NULL,
115 `attachment_id` int(11) NOT NULL,
116 PRIMARY KEY (`contact_person_id`,`attachment_id`),
117 UNIQUE KEY `UNIQ_8E2EB90E464E68B` (`attachment_id`),
118 KEY `IDX_8E2EB90E4F8A983C` (`contact_person_id`),
119 CONSTRAINT `FK_8E2EB90E464E68B` FOREIGN KEY (`attachment_id`) REFERENCES `asset` (`id`) ON DELETE CASCADE,
120 CONSTRAINT `FK_8E2EB90E4F8A983C` FOREIGN KEY (`contact_person_id`) REFERENCES `contact_person` (`id`) ON DELETE CASCADE
121) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
122
123# Dump of table department
124# ------------------------------------------------------------
125
126DROP TABLE IF EXISTS `department`;
127
128CREATE TABLE `department` (
129 `id` int(11) NOT NULL AUTO_INCREMENT,
130 `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
131 `display_order` int(11) NOT NULL,
132 PRIMARY KEY (`id`)
133) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
134
135# Dump of table document
136# ------------------------------------------------------------
137
138DROP TABLE IF EXISTS `document`;
139
140CREATE TABLE `document` (
141 `id` int(11) NOT NULL AUTO_INCREMENT,
142 `category_id` int(11) DEFAULT NULL,
143 `name` varchar(140) COLLATE utf8_unicode_ci NOT NULL,
144 `deleted_on` datetime DEFAULT NULL,
145 `allow_preview` tinyint(1) NOT NULL,
146 PRIMARY KEY (`id`),
147 KEY `IDX_D8698A7612469DE2` (`category_id`),
148 CONSTRAINT `FK_D8698A7612469DE2` FOREIGN KEY (`category_id`) REFERENCES `document_category` (`id`)
149) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
150
151# Dump of table document_category
152# ------------------------------------------------------------
153
154DROP TABLE IF EXISTS `document_category`;
155
156CREATE TABLE `document_category` (
157 `id` int(11) NOT NULL AUTO_INCREMENT,
158 `name` varchar(140) COLLATE utf8_unicode_ci NOT NULL,
159 PRIMARY KEY (`id`)
160) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
161
162LOCK TABLES `document_category` WRITE;
163/*!40000 ALTER TABLE `document_category` DISABLE KEYS */;
164
165INSERT INTO `document_category` (`id`, `name`)
166VALUES
167 (1,'Catalogs'),
168 (2,'Miscellaneous'),
169 (3,''),
170 (4,'Industry'),
171 (5,'DC'),
172 (6,'ICE'),
173 (8,'Testafdeling'),
174 (9,'Application stories'),
175 (10,'IMA (CIS)'),
176 (11,'Technologies'),
177 (12,'TEST CATEGORY - DO NOT USE CONTENT !'),
178 (13,'Selection guides'),
179 (15,'Temp files voor download');
180
181/*!40000 ALTER TABLE `document_category` ENABLE KEYS */;
182UNLOCK TABLES;
183
184
185# Dump of table document_option
186# ------------------------------------------------------------
187
188DROP TABLE IF EXISTS `document_option`;
189
190CREATE TABLE `document_option` (
191 `id` int(11) NOT NULL AUTO_INCREMENT,
192 `document_id` int(11) DEFAULT NULL,
193 `asset_id` int(11) DEFAULT NULL,
194 `language` int(11) NOT NULL,
195 `medium` int(11) NOT NULL,
196 `clean_url` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
197 `deleted_on` datetime DEFAULT NULL,
198 PRIMARY KEY (`id`),
199 UNIQUE KEY `UNIQ_E4E4B1D65DA1941` (`asset_id`),
200 KEY `IDX_E4E4B1D6C33F7837` (`document_id`),
201 CONSTRAINT `FK_E4E4B1D65DA1941` FOREIGN KEY (`asset_id`) REFERENCES `asset` (`id`),
202 CONSTRAINT `FK_E4E4B1D6C33F7837` FOREIGN KEY (`document_id`) REFERENCES `document` (`id`)
203) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
204
205# Dump of table document_translation
206# ------------------------------------------------------------
207
208DROP TABLE IF EXISTS `document_translation`;
209
210CREATE TABLE `document_translation` (
211 `id` int(11) NOT NULL AUTO_INCREMENT,
212 `document_id` int(11) DEFAULT NULL,
213 `language` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
214 `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
215 PRIMARY KEY (`id`),
216 KEY `IDX_36C07205C33F7837` (`document_id`),
217 CONSTRAINT `FK_36C07205C33F7837` FOREIGN KEY (`document_id`) REFERENCES `document` (`id`)
218) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
219
220
221# Dump of table email_template
222# ------------------------------------------------------------
223
224DROP TABLE IF EXISTS `email_template`;
225
226CREATE TABLE `email_template` (
227 `id` int(11) NOT NULL AUTO_INCREMENT,
228 `creator_id` int(11) DEFAULT NULL,
229 `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
230 `body` longtext COLLATE utf8_unicode_ci,
231 `createdDate` datetime NOT NULL,
232 `updatedDate` datetime NOT NULL,
233 `last_editor_id` int(11) DEFAULT NULL,
234 `show_document_block` tinyint(1) NOT NULL,
235 `digital_block_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
236 `language_id` int(11) DEFAULT NULL,
237 `show_print_block` tinyint(1) NOT NULL,
238 `digital_block_description` longtext COLLATE utf8_unicode_ci,
239 `print_block_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
240 `print_block_description` longtext COLLATE utf8_unicode_ci,
241 `account_manager_block_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
242 `account_manager_block_description` longtext COLLATE utf8_unicode_ci,
243 PRIMARY KEY (`id`),
244 KEY `IDX_9C0600CA61220EA6` (`creator_id`),
245 KEY `IDX_9C0600CA7E5A734A` (`last_editor_id`),
246 KEY `IDX_9C0600CA82F1BAF4` (`language_id`),
247 CONSTRAINT `FK_9C0600CA61220EA6` FOREIGN KEY (`creator_id`) REFERENCES `employee` (`id`),
248 CONSTRAINT `FK_9C0600CA7E5A734A` FOREIGN KEY (`last_editor_id`) REFERENCES `employee` (`id`),
249 CONSTRAINT `FK_9C0600CA82F1BAF4` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`)
250) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
251
252# Dump of table employee
253# ------------------------------------------------------------
254
255DROP TABLE IF EXISTS `employee`;
256
257CREATE TABLE `employee` (
258 `id` int(11) NOT NULL AUTO_INCREMENT,
259 `department_id` int(11) DEFAULT NULL,
260 `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
261 `firstname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
262 `lastname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
263 `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
264 `is_active` tinyint(1) NOT NULL,
265 `api_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
266 `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
267 `password` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
268 `language_id` int(11) DEFAULT NULL,
269 `job_title` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
270 `device_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
271 `deleted_on` datetime DEFAULT NULL,
272 `crmCode` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
273 `roles` longtext COLLATE utf8_unicode_ci COMMENT '(DC2Type:array)',
274 PRIMARY KEY (`id`),
275 UNIQUE KEY `UNIQ_5D9F75A1F85E0677` (`username`),
276 UNIQUE KEY `UNIQ_5D9F75A1E7927C74` (`email`),
277 UNIQUE KEY `UNIQ_5D9F75A1C912ED9D` (`api_key`),
278 UNIQUE KEY `UNIQ_5D9F75A1F619D68A` (`crmCode`),
279 KEY `IDX_5D9F75A1AE80F5DF` (`department_id`),
280 KEY `IDX_5D9F75A182F1BAF4` (`language_id`),
281 CONSTRAINT `FK_5D9F75A182F1BAF4` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`),
282 CONSTRAINT `FK_5D9F75A1AE80F5DF` FOREIGN KEY (`department_id`) REFERENCES `department` (`id`)
283) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
284
285# Dump of table fair
286# ------------------------------------------------------------
287
288DROP TABLE IF EXISTS `fair`;
289
290CREATE TABLE `fair` (
291 `id` int(11) NOT NULL AUTO_INCREMENT,
292 `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
293 `startDate` date NOT NULL,
294 `endDate` date DEFAULT NULL,
295 `locationName` varchar(140) COLLATE utf8_unicode_ci NOT NULL,
296 `street` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
297 `zipcode` varchar(4) COLLATE utf8_unicode_ci DEFAULT NULL,
298 `city` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
299 PRIMARY KEY (`id`)
300) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
301
302# Dump of table language
303# ------------------------------------------------------------
304
305DROP TABLE IF EXISTS `language`;
306
307CREATE TABLE `language` (
308 `id` int(11) NOT NULL AUTO_INCREMENT,
309 `name` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
310 `full_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
311 `code` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
312 PRIMARY KEY (`id`)
313) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
314
315LOCK TABLES `language` WRITE;
316/*!40000 ALTER TABLE `language` DISABLE KEYS */;
317
318INSERT INTO `language` (`id`, `name`, `full_name`, `code`)
319VALUES
320 (1,'NL','Nederlands','nl_BE'),
321 (2,'FR','Français','fr_BE'),
322 (3,'ENG','English','en_GB');
323
324/*!40000 ALTER TABLE `language` ENABLE KEYS */;
325UNLOCK TABLES;
326
327
328# Dump of table notification
329# ------------------------------------------------------------
330
331DROP TABLE IF EXISTS `notification`;
332
333CREATE TABLE `notification` (
334 `id` int(11) NOT NULL AUTO_INCREMENT,
335 `creator_id` int(11) DEFAULT NULL,
336 `receiver_id` int(11) DEFAULT NULL,
337 `createdDate` datetime NOT NULL,
338 `checkedDate` datetime DEFAULT NULL,
339 `object_type` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
340 `action` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
341 `message` varchar(140) COLLATE utf8_unicode_ci NOT NULL,
342 `object_id` int(11) NOT NULL,
343 PRIMARY KEY (`id`),
344 KEY `IDX_BF5476CA61220EA6` (`creator_id`),
345 KEY `IDX_BF5476CACD53EDB6` (`receiver_id`),
346 CONSTRAINT `FK_BF5476CA61220EA6` FOREIGN KEY (`creator_id`) REFERENCES `employee` (`id`),
347 CONSTRAINT `FK_BF5476CACD53EDB6` FOREIGN KEY (`receiver_id`) REFERENCES `employee` (`id`)
348) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
349
350# Dump of table report
351# ------------------------------------------------------------
352
353DROP TABLE IF EXISTS `report`;
354
355CREATE TABLE `report` (
356 `id` int(11) NOT NULL AUTO_INCREMENT,
357 `creator_id` int(11) DEFAULT NULL,
358 `notes` longtext COLLATE utf8_unicode_ci,
359 `priority` int(11) NOT NULL,
360 `createdDate` datetime NOT NULL,
361 `updatedDate` datetime DEFAULT NULL,
362 `fair_id` int(11) DEFAULT NULL,
363 `mail_send_date` datetime DEFAULT NULL,
364 `locked` tinyint(1) NOT NULL,
365 `last_editor_id` int(11) DEFAULT NULL,
366 `title` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
367 PRIMARY KEY (`id`),
368 KEY `IDX_C42F778461220EA6` (`creator_id`),
369 KEY `IDX_C42F77847AB61B57` (`fair_id`),
370 KEY `IDX_C42F77847E5A734A` (`last_editor_id`),
371 CONSTRAINT `FK_C42F778461220EA6` FOREIGN KEY (`creator_id`) REFERENCES `employee` (`id`),
372 CONSTRAINT `FK_C42F77847AB61B57` FOREIGN KEY (`fair_id`) REFERENCES `fair` (`id`),
373 CONSTRAINT `FK_C42F77847E5A734A` FOREIGN KEY (`last_editor_id`) REFERENCES `employee` (`id`)
374) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
375
376# Dump of table report_log
377# ------------------------------------------------------------
378
379DROP TABLE IF EXISTS `report_log`;
380
381CREATE TABLE `report_log` (
382 `id` int(11) NOT NULL AUTO_INCREMENT,
383 `createdDate` datetime NOT NULL,
384 `creatorId` int(11) NOT NULL,
385 `log` longtext COLLATE utf8_unicode_ci NOT NULL,
386 `success` tinyint(1) NOT NULL,
387 PRIMARY KEY (`id`)
388) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
389
390# Dump of table reports_attachments
391# ------------------------------------------------------------
392
393DROP TABLE IF EXISTS `reports_attachments`;
394
395CREATE TABLE `reports_attachments` (
396 `report_id` int(11) NOT NULL,
397 `asset_id` int(11) NOT NULL,
398 PRIMARY KEY (`report_id`,`asset_id`),
399 UNIQUE KEY `UNIQ_3ED72ABF5DA1941` (`asset_id`),
400 KEY `IDX_3ED72ABF4BD2A4C0` (`report_id`),
401 CONSTRAINT `FK_3ED72ABF4BD2A4C0` FOREIGN KEY (`report_id`) REFERENCES `report` (`id`) ON DELETE CASCADE,
402 CONSTRAINT `FK_3ED72ABF5DA1941` FOREIGN KEY (`asset_id`) REFERENCES `asset` (`id`) ON DELETE CASCADE
403) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
404
405# Dump of table reports_contact_persons
406# ------------------------------------------------------------
407
408DROP TABLE IF EXISTS `reports_contact_persons`;
409
410CREATE TABLE `reports_contact_persons` (
411 `report_id` int(11) NOT NULL,
412 `contact_person_id` int(11) NOT NULL,
413 PRIMARY KEY (`report_id`,`contact_person_id`),
414 KEY `IDX_BBE2E3E14BD2A4C0` (`report_id`),
415 KEY `IDX_BBE2E3E14F8A983C` (`contact_person_id`),
416 CONSTRAINT `FK_BBE2E3E14BD2A4C0` FOREIGN KEY (`report_id`) REFERENCES `report` (`id`),
417 CONSTRAINT `FK_BBE2E3E14F8A983C` FOREIGN KEY (`contact_person_id`) REFERENCES `contact_person` (`id`)
418) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
419
420# Dump of table reports_contributors
421# ------------------------------------------------------------
422
423DROP TABLE IF EXISTS `reports_contributors`;
424
425CREATE TABLE `reports_contributors` (
426 `report_id` int(11) NOT NULL,
427 `employee_id` int(11) NOT NULL,
428 PRIMARY KEY (`report_id`,`employee_id`),
429 KEY `IDX_46C5A84E4BD2A4C0` (`report_id`),
430 KEY `IDX_46C5A84E8C03F15C` (`employee_id`),
431 CONSTRAINT `FK_46C5A84E4BD2A4C0` FOREIGN KEY (`report_id`) REFERENCES `report` (`id`) ON DELETE CASCADE,
432 CONSTRAINT `FK_46C5A84E8C03F15C` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`id`) ON DELETE CASCADE
433) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
434
435# Dump of table reports_documents
436# ------------------------------------------------------------
437
438DROP TABLE IF EXISTS `reports_documents`;
439
440CREATE TABLE `reports_documents` (
441 `report_id` int(11) NOT NULL,
442 `document_id` int(11) NOT NULL,
443 PRIMARY KEY (`report_id`,`document_id`),
444 KEY `IDX_70E8E2BE4BD2A4C0` (`report_id`),
445 KEY `IDX_70E8E2BEC33F7837` (`document_id`),
446 CONSTRAINT `FK_70E8E2BE4BD2A4C0` FOREIGN KEY (`report_id`) REFERENCES `report` (`id`),
447 CONSTRAINT `FK_70E8E2BEC33F7837` FOREIGN KEY (`document_id`) REFERENCES `document_option` (`id`)
448) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
449
450# Dump of table role
451# ------------------------------------------------------------
452
453DROP TABLE IF EXISTS `role`;
454
455CREATE TABLE `role` (
456 `id` int(11) NOT NULL AUTO_INCREMENT,
457 `name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
458 PRIMARY KEY (`id`),
459 UNIQUE KEY `UNIQ_57698A6A5E237E06` (`name`)
460) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
461
462
463
464# Dump of table todo_item
465# ------------------------------------------------------------
466
467DROP TABLE IF EXISTS `todo_item`;
468
469CREATE TABLE `todo_item` (
470 `id` int(11) NOT NULL AUTO_INCREMENT,
471 `report_id` int(11) DEFAULT NULL,
472 `description` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
473 `status` tinyint(1) NOT NULL,
474 `createdDate` datetime NOT NULL,
475 `updatedDate` datetime DEFAULT NULL,
476 `assigned_id` int(11) DEFAULT NULL,
477 PRIMARY KEY (`id`),
478 KEY `IDX_40CA43014BD2A4C0` (`report_id`),
479 KEY `IDX_40CA4301E1501A05` (`assigned_id`),
480 CONSTRAINT `FK_40CA43014BD2A4C0` FOREIGN KEY (`report_id`) REFERENCES `report` (`id`),
481 CONSTRAINT `FK_40CA4301E1501A05` FOREIGN KEY (`assigned_id`) REFERENCES `employee` (`id`)
482) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
483
484# Dump of table translation
485# ------------------------------------------------------------
486
487DROP TABLE IF EXISTS `translation`;
488
489CREATE TABLE `translation` (
490 `id` int(11) NOT NULL AUTO_INCREMENT,
491 `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
492 `filename` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
493 `filename_json` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
494 `createdDate` datetime NOT NULL,
495 `updatedDate` datetime DEFAULT NULL,
496 PRIMARY KEY (`id`)
497) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
498
499
500
501
502/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
503/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
504/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
505/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
506/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
507/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;