Projekt

Obecné

Profil

Stáhnout (55.2 KB) Statistiky
| Větev: | Tag: | Revize:
1
-- phpMyAdmin SQL Dump
2
-- version 5.0.4deb2
3
-- https://www.phpmyadmin.net/
4
--
5
-- Host: localhost
6
-- Generation Time: May 02, 2022 at 03:12 PM
7
-- Server version: 10.5.15-MariaDB-0+deb11u1
8
-- PHP Version: 7.4.28
9

    
10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11
START TRANSACTION;
12
SET time_zone = "+00:00";
13

    
14

    
15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
16
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
17
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
18
/*!40101 SET NAMES utf8mb4 */;
19

    
20
--
21
-- Database: `spade`
22
--
23
CREATE DATABASE IF NOT EXISTS `spade` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
24
USE `spade`;
25

    
26
-- --------------------------------------------------------
27

    
28
--
29
-- Table structure for table `activity`
30
--
31

    
32
CREATE TABLE `activity` (
33
  `id` bigint(20) NOT NULL,
34
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
35
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
36
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
37
  `endDate` date DEFAULT NULL,
38
  `startDate` date DEFAULT NULL,
39
  `superProjectId` bigint(20) DEFAULT NULL
40
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
41

    
42
-- --------------------------------------------------------
43

    
44
--
45
-- Table structure for table `artifact`
46
--
47

    
48
CREATE TABLE `artifact` (
49
  `artifactClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
50
  `mimeType` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
51
  `size` bigint(20) NOT NULL,
52
  `id` bigint(20) NOT NULL
53
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
54

    
55
-- --------------------------------------------------------
56

    
57
--
58
-- Stand-in structure for view `artifactView`
59
-- (See below for the actual view)
60
--
61
CREATE TABLE `artifactView` (
62
`name` varchar(255)
63
,`description` longtext
64
,`created` datetime
65
,`url` varchar(255)
66
,`id` bigint(20)
67
,`artifactClass` varchar(255)
68
,`mimeType` varchar(255)
69
,`size` bigint(20)
70
,`authorId` bigint(20)
71
,`authorName` varchar(255)
72
,`projectId` bigint(20)
73
);
74

    
75
-- --------------------------------------------------------
76

    
77
--
78
-- Table structure for table `branch`
79
--
80

    
81
CREATE TABLE `branch` (
82
  `id` bigint(20) NOT NULL,
83
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
84
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
85
  `isMain` bit(1) NOT NULL
86
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
87

    
88
-- --------------------------------------------------------
89

    
90
--
91
-- Table structure for table `category`
92
--
93

    
94
CREATE TABLE `category` (
95
  `id` bigint(20) NOT NULL,
96
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
97
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
98
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
99
  `projectInstanceId` bigint(20) DEFAULT NULL
100
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
101

    
102
-- --------------------------------------------------------
103

    
104
--
105
-- Table structure for table `commit`
106
--
107

    
108
CREATE TABLE `commit` (
109
  `identifier` varchar(7) COLLATE utf8_unicode_ci DEFAULT NULL,
110
  `isRelease` bit(1) NOT NULL,
111
  `id` bigint(20) NOT NULL
112
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
113

    
114
-- --------------------------------------------------------
115

    
116
--
117
-- Stand-in structure for view `commitedConfigView`
118
-- (See below for the actual view)
119
--
120
CREATE TABLE `commitedConfigView` (
121
`id` bigint(20)
122
,`type` varchar(31)
123
,`name` varchar(255)
124
,`description` longtext
125
,`created` datetime
126
,`authorId` bigint(20)
127
,`authorName` varchar(255)
128
,`relationName` varchar(255)
129
,`relatedId` bigint(20)
130
,`relatedName` varchar(255)
131
,`projectId` bigint(20)
132
,`committed` datetime
133
);
134

    
135
-- --------------------------------------------------------
136

    
137
--
138
-- Table structure for table `committed_configuration`
139
--
140

    
141
CREATE TABLE `committed_configuration` (
142
  `committed` datetime DEFAULT NULL,
143
  `id` bigint(20) NOT NULL
144
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
145

    
146
-- --------------------------------------------------------
147

    
148
--
149
-- Stand-in structure for view `commitView`
150
-- (See below for the actual view)
151
--
152
CREATE TABLE `commitView` (
153
`id` bigint(20)
154
,`type` varchar(31)
155
,`name` varchar(255)
156
,`description` longtext
157
,`created` datetime
158
,`authorId` bigint(20)
159
,`authorName` varchar(255)
160
,`relationName` varchar(255)
161
,`relatedId` bigint(20)
162
,`relatedName` varchar(255)
163
,`projectId` bigint(20)
164
,`committed` datetime
165
,`isRelease` bit(1)
166
,`tag` varchar(255)
167
,`branch` varchar(255)
168
,`main` bit(1)
169
);
170

    
171
-- --------------------------------------------------------
172

    
173
--
174
-- Table structure for table `competency`
175
--
176

    
177
CREATE TABLE `competency` (
178
  `id` bigint(20) NOT NULL,
179
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
180
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
181
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL
182
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
183

    
184
-- --------------------------------------------------------
185

    
186
--
187
-- Table structure for table `configuration`
188
--
189

    
190
CREATE TABLE `configuration` (
191
  `id` bigint(20) NOT NULL,
192
  `projectId` bigint(20) DEFAULT NULL
193
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
194

    
195
-- --------------------------------------------------------
196

    
197
--
198
-- Stand-in structure for view `configurationView`
199
-- (See below for the actual view)
200
--
201
CREATE TABLE `configurationView` (
202
`id` bigint(20)
203
,`type` varchar(31)
204
,`name` varchar(255)
205
,`description` longtext
206
,`created` datetime
207
,`authorId` bigint(20)
208
,`authorName` varchar(255)
209
,`relationName` varchar(255)
210
,`relatedId` bigint(20)
211
,`relatedName` varchar(255)
212
,`projectId` bigint(20)
213
);
214

    
215
-- --------------------------------------------------------
216

    
217
--
218
-- Table structure for table `configuration_branch`
219
--
220

    
221
CREATE TABLE `configuration_branch` (
222
  `configurationId` bigint(20) NOT NULL,
223
  `branchId` bigint(20) NOT NULL
224
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
225

    
226
-- --------------------------------------------------------
227

    
228
--
229
-- Table structure for table `configuration_change`
230
--
231

    
232
CREATE TABLE `configuration_change` (
233
  `configurationId` bigint(20) NOT NULL,
234
  `changeId` bigint(20) NOT NULL
235
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
236

    
237
-- --------------------------------------------------------
238

    
239
--
240
-- Table structure for table `configuration_person_relation`
241
--
242

    
243
CREATE TABLE `configuration_person_relation` (
244
  `id` bigint(20) NOT NULL,
245
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
246
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
247
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
248
  `personId` bigint(20) DEFAULT NULL,
249
  `configurationId` bigint(20) DEFAULT NULL
250
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
251

    
252
-- --------------------------------------------------------
253

    
254
--
255
-- Table structure for table `criterion`
256
--
257

    
258
CREATE TABLE `criterion` (
259
  `id` bigint(20) NOT NULL,
260
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
261
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
262
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL
263
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
264

    
265
-- --------------------------------------------------------
266

    
267
--
268
-- Stand-in structure for view `fieldChangeView`
269
-- (See below for the actual view)
270
--
271
CREATE TABLE `fieldChangeView` (
272
`id` bigint(20)
273
,`type` varchar(31)
274
,`name` varchar(255)
275
,`description` longtext
276
,`created` datetime
277
,`authorId` bigint(20)
278
,`authorName` varchar(255)
279
,`relationName` varchar(255)
280
,`relatedId` bigint(20)
281
,`relatedName` varchar(255)
282
,`projectId` bigint(20)
283
,`changeName` varchar(255)
284
,`changeDesc` longtext
285
,`itemId` bigint(20)
286
,`itemType` varchar(31)
287
,`itemName` varchar(255)
288
,`itemDesc` longtext
289
,`itemCreated` datetime
290
,`field` varchar(255)
291
,`newValue` longtext
292
,`oldValue` longtext
293
);
294

    
295
-- --------------------------------------------------------
296

    
297
--
298
-- Table structure for table `field_change`
299
--
300

    
301
CREATE TABLE `field_change` (
302
  `id` bigint(20) NOT NULL,
303
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
304
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
305
  `newValue` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
306
  `oldValue` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
307
  `workItemChangeId` bigint(20) DEFAULT NULL
308
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
309

    
310
-- --------------------------------------------------------
311

    
312
--
313
-- Table structure for table `group_member`
314
--
315

    
316
CREATE TABLE `group_member` (
317
  `groupId` bigint(20) NOT NULL,
318
  `memberId` bigint(20) NOT NULL
319
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
320

    
321
-- --------------------------------------------------------
322

    
323
--
324
-- Table structure for table `identity`
325
--
326

    
327
CREATE TABLE `identity` (
328
  `id` bigint(20) NOT NULL,
329
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
330
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
331
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
332
  `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
333
  `personId` bigint(20) DEFAULT NULL
334
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
335

    
336
-- --------------------------------------------------------
337

    
338
--
339
-- Table structure for table `iteration`
340
--
341

    
342
CREATE TABLE `iteration` (
343
  `id` bigint(20) NOT NULL,
344
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
345
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
346
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
347
  `endDate` date DEFAULT NULL,
348
  `startDate` date DEFAULT NULL,
349
  `created` datetime DEFAULT NULL,
350
  `superProjectId` bigint(20) DEFAULT NULL,
351
  `configurationId` bigint(20) DEFAULT NULL
352
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
353

    
354
-- --------------------------------------------------------
355

    
356
--
357
-- Table structure for table `milestone`
358
--
359

    
360
CREATE TABLE `milestone` (
361
  `id` bigint(20) NOT NULL,
362
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
363
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
364
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL
365
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
366

    
367
-- --------------------------------------------------------
368

    
369
--
370
-- Table structure for table `milestone_criterion`
371
--
372

    
373
CREATE TABLE `milestone_criterion` (
374
  `milestoneId` bigint(20) NOT NULL,
375
  `criterionId` bigint(20) NOT NULL
376
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
377

    
378
-- --------------------------------------------------------
379

    
380
--
381
-- Table structure for table `people_group`
382
--
383

    
384
CREATE TABLE `people_group` (
385
  `id` bigint(20) NOT NULL,
386
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
387
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
388
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
389
  `projectInstanceId` bigint(20) DEFAULT NULL
390
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
391

    
392
-- --------------------------------------------------------
393

    
394
--
395
-- Table structure for table `person`
396
--
397

    
398
CREATE TABLE `person` (
399
  `id` bigint(20) NOT NULL,
400
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
401
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
402
  `projectId` bigint(20) DEFAULT NULL
403
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
404

    
405
-- --------------------------------------------------------
406

    
407
--
408
-- Stand-in structure for view `personView`
409
-- (See below for the actual view)
410
--
411
CREATE TABLE `personView` (
412
`id` bigint(20)
413
,`name` varchar(255)
414
,`projectId` bigint(20)
415
);
416

    
417
-- --------------------------------------------------------
418

    
419
--
420
-- Stand-in structure for view `personWithRolesView`
421
-- (See below for the actual view)
422
--
423
CREATE TABLE `personWithRolesView` (
424
`id` bigint(20)
425
,`name` varchar(255)
426
,`role` varchar(255)
427
,`roleClass` varchar(255)
428
,`roleSuperClass` varchar(255)
429
,`projectId` bigint(20)
430
);
431

    
432
-- --------------------------------------------------------
433

    
434
--
435
-- Table structure for table `person_competency`
436
--
437

    
438
CREATE TABLE `person_competency` (
439
  `personId` bigint(20) NOT NULL,
440
  `competencyId` bigint(20) NOT NULL
441
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
442

    
443
-- --------------------------------------------------------
444

    
445
--
446
-- Table structure for table `person_role`
447
--
448

    
449
CREATE TABLE `person_role` (
450
  `personId` bigint(20) NOT NULL,
451
  `roleId` bigint(20) NOT NULL
452
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
453

    
454
-- --------------------------------------------------------
455

    
456
--
457
-- Table structure for table `phase`
458
--
459

    
460
CREATE TABLE `phase` (
461
  `id` bigint(20) NOT NULL,
462
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
463
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
464
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
465
  `endDate` date DEFAULT NULL,
466
  `startDate` date DEFAULT NULL,
467
  `created` datetime DEFAULT NULL,
468
  `superProjectId` bigint(20) DEFAULT NULL,
469
  `configurationId` bigint(20) DEFAULT NULL,
470
  `milestoneId` bigint(20) DEFAULT NULL
471
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
472

    
473
-- --------------------------------------------------------
474

    
475
--
476
-- Table structure for table `priority`
477
--
478

    
479
CREATE TABLE `priority` (
480
  `id` bigint(20) NOT NULL,
481
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
482
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
483
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
484
  `classId` bigint(20) DEFAULT NULL,
485
  `projectInstanceId` bigint(20) DEFAULT NULL
486
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
487

    
488
-- --------------------------------------------------------
489

    
490
--
491
-- Table structure for table `priority_classification`
492
--
493

    
494
CREATE TABLE `priority_classification` (
495
  `id` bigint(20) NOT NULL,
496
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
497
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
498
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
499

    
500
-- --------------------------------------------------------
501

    
502
--
503
-- Table structure for table `program`
504
--
505

    
506
CREATE TABLE `program` (
507
  `programClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
508
  `id` bigint(20) NOT NULL
509
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
510

    
511
-- --------------------------------------------------------
512

    
513
--
514
-- Table structure for table `project`
515
--
516

    
517
CREATE TABLE `project` (
518
  `id` bigint(20) NOT NULL,
519
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
520
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
521
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
522
  `endDate` date DEFAULT NULL,
523
  `startDate` date DEFAULT NULL,
524
  `superProjectId` bigint(20) DEFAULT NULL
525
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
526

    
527
-- --------------------------------------------------------
528

    
529
--
530
-- Table structure for table `project_instance`
531
--
532

    
533
CREATE TABLE `project_instance` (
534
  `id` bigint(20) NOT NULL,
535
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
536
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
537
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
538
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
539
  `projectId` bigint(20) DEFAULT NULL,
540
  `toolInstanceId` bigint(20) DEFAULT NULL
541
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
542

    
543
-- --------------------------------------------------------
544

    
545
--
546
-- Table structure for table `relation`
547
--
548

    
549
CREATE TABLE `relation` (
550
  `id` bigint(20) NOT NULL,
551
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
552
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
553
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
554
  `classId` bigint(20) DEFAULT NULL,
555
  `projectInstanceId` bigint(20) DEFAULT NULL
556
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
557

    
558
-- --------------------------------------------------------
559

    
560
--
561
-- Table structure for table `relation_classification`
562
--
563

    
564
CREATE TABLE `relation_classification` (
565
  `id` bigint(20) NOT NULL,
566
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
567
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
568
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
569

    
570
-- --------------------------------------------------------
571

    
572
--
573
-- Table structure for table `resolution`
574
--
575

    
576
CREATE TABLE `resolution` (
577
  `id` bigint(20) NOT NULL,
578
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
579
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
580
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
581
  `classId` bigint(20) DEFAULT NULL,
582
  `projectInstanceId` bigint(20) DEFAULT NULL
583
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
584

    
585
-- --------------------------------------------------------
586

    
587
--
588
-- Table structure for table `resolution_classification`
589
--
590

    
591
CREATE TABLE `resolution_classification` (
592
  `id` bigint(20) NOT NULL,
593
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
594
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
595
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
596

    
597
-- --------------------------------------------------------
598

    
599
--
600
-- Table structure for table `role`
601
--
602

    
603
CREATE TABLE `role` (
604
  `id` bigint(20) NOT NULL,
605
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
606
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
607
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
608
  `classId` bigint(20) DEFAULT NULL,
609
  `projectInstanceId` bigint(20) DEFAULT NULL
610
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
611

    
612
-- --------------------------------------------------------
613

    
614
--
615
-- Table structure for table `role_classification`
616
--
617

    
618
CREATE TABLE `role_classification` (
619
  `id` bigint(20) NOT NULL,
620
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
621
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
622
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
623

    
624
-- --------------------------------------------------------
625

    
626
--
627
-- Table structure for table `severity`
628
--
629

    
630
CREATE TABLE `severity` (
631
  `id` bigint(20) NOT NULL,
632
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
633
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
634
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
635
  `classId` bigint(20) DEFAULT NULL,
636
  `projectInstanceId` bigint(20) DEFAULT NULL
637
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
638

    
639
-- --------------------------------------------------------
640

    
641
--
642
-- Table structure for table `severity_classification`
643
--
644

    
645
CREATE TABLE `severity_classification` (
646
  `id` bigint(20) NOT NULL,
647
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
648
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
649
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
650

    
651
-- --------------------------------------------------------
652

    
653
--
654
-- Table structure for table `status`
655
--
656

    
657
CREATE TABLE `status` (
658
  `id` bigint(20) NOT NULL,
659
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
660
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
661
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
662
  `classId` bigint(20) DEFAULT NULL,
663
  `projectInstanceId` bigint(20) DEFAULT NULL
664
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
665

    
666
-- --------------------------------------------------------
667

    
668
--
669
-- Table structure for table `status_classification`
670
--
671

    
672
CREATE TABLE `status_classification` (
673
  `id` bigint(20) NOT NULL,
674
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
675
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
676
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
677

    
678
-- --------------------------------------------------------
679

    
680
--
681
-- Table structure for table `tag`
682
--
683

    
684
CREATE TABLE `tag` (
685
  `id` bigint(20) NOT NULL,
686
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
687
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
688
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
689
  `configurationId` bigint(20) DEFAULT NULL
690
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
691

    
692
-- --------------------------------------------------------
693

    
694
--
695
-- Table structure for table `tool_instance`
696
--
697

    
698
CREATE TABLE `tool_instance` (
699
  `id` bigint(20) NOT NULL,
700
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
701
  `tool` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
702
  `version` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
703
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
704

    
705
-- --------------------------------------------------------
706

    
707
--
708
-- Stand-in structure for view `workUnitView`
709
-- (See below for the actual view)
710
--
711
CREATE TABLE `workUnitView` (
712
`id` bigint(20)
713
,`name` varchar(255)
714
,`description` longtext
715
,`created` datetime
716
,`dueDate` date
717
,`estimatedTime` double
718
,`progress` int(11)
719
,`spentTime` double
720
,`startDate` date
721
,`projectId` bigint(20)
722
,`authorId` bigint(20)
723
,`authorName` varchar(255)
724
,`assigneeId` bigint(20)
725
,`assigneeName` varchar(255)
726
,`activityName` varchar(255)
727
,`activityDesc` longtext
728
,`activityEndDate` date
729
,`activityStartDate` date
730
,`iterationName` varchar(255)
731
,`iterationDesc` longtext
732
,`iterationStartDate` date
733
,`iterationEndDate` date
734
,`iterationCreated` datetime
735
,`phaseName` varchar(255)
736
,`phaseDesc` longtext
737
,`phaseStartDate` date
738
,`phaseEndDate` date
739
,`phaseCreated` datetime
740
,`priorityName` varchar(255)
741
,`priorityDesc` longtext
742
,`prioClass` varchar(255)
743
,`prioSuperClass` varchar(255)
744
,`severityName` varchar(255)
745
,`severityDesc` longtext
746
,`severityClass` varchar(255)
747
,`severitySuperClass` varchar(255)
748
,`resolutionName` varchar(255)
749
,`resolutionDescription` longtext
750
,`resolutionClass` varchar(255)
751
,`resolutionSuperClass` varchar(255)
752
,`statusName` varchar(255)
753
,`statusDescription` longtext
754
,`statusClass` varchar(255)
755
,`statusSuperClass` varchar(255)
756
,`wuTypeName` varchar(255)
757
,`wuTypeDescription` longtext
758
,`wuTypeClass` varchar(255)
759
,`categoryName` varchar(255)
760
,`categoryDesc` longtext
761
);
762

    
763
-- --------------------------------------------------------
764

    
765
--
766
-- Table structure for table `work_item`
767
--
768

    
769
CREATE TABLE `work_item` (
770
  `workItemType` varchar(31) COLLATE utf8_unicode_ci NOT NULL,
771
  `id` bigint(20) NOT NULL,
772
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
773
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
774
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
775
  `created` datetime DEFAULT NULL,
776
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
777
  `authorId` bigint(20) DEFAULT NULL
778
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
779

    
780
-- --------------------------------------------------------
781

    
782
--
783
-- Table structure for table `work_item_change`
784
--
785

    
786
CREATE TABLE `work_item_change` (
787
  `id` bigint(20) NOT NULL,
788
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
789
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
790
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
791
  `workItemId` bigint(20) DEFAULT NULL
792
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
793

    
794
-- --------------------------------------------------------
795

    
796
--
797
-- Table structure for table `work_item_relation`
798
--
799

    
800
CREATE TABLE `work_item_relation` (
801
  `id` bigint(20) NOT NULL,
802
  `rightItemId` bigint(20) DEFAULT NULL,
803
  `relationId` bigint(20) DEFAULT NULL,
804
  `leftItemId` bigint(20) DEFAULT NULL
805
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
806

    
807
-- --------------------------------------------------------
808

    
809
--
810
-- Table structure for table `work_unit`
811
--
812

    
813
CREATE TABLE `work_unit` (
814
  `dueDate` date DEFAULT NULL,
815
  `estimatedTime` double NOT NULL,
816
  `number` int(11) NOT NULL,
817
  `progress` int(11) NOT NULL,
818
  `spentTime` double NOT NULL,
819
  `startDate` date DEFAULT NULL,
820
  `id` bigint(20) NOT NULL,
821
  `activityId` bigint(20) DEFAULT NULL,
822
  `assigneeId` bigint(20) DEFAULT NULL,
823
  `iterationId` bigint(20) DEFAULT NULL,
824
  `phaseId` bigint(20) DEFAULT NULL,
825
  `priorityId` bigint(20) DEFAULT NULL,
826
  `resolutionId` bigint(20) DEFAULT NULL,
827
  `severityId` bigint(20) DEFAULT NULL,
828
  `statusId` bigint(20) DEFAULT NULL,
829
  `wuTypeId` bigint(20) DEFAULT NULL,
830
  `projectId` bigint(20) DEFAULT NULL
831
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
832

    
833
-- --------------------------------------------------------
834

    
835
--
836
-- Table structure for table `work_unit_category`
837
--
838

    
839
CREATE TABLE `work_unit_category` (
840
  `workUnitId` bigint(20) NOT NULL,
841
  `categoryId` bigint(20) NOT NULL
842
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
843

    
844
-- --------------------------------------------------------
845

    
846
--
847
-- Table structure for table `wu_type`
848
--
849

    
850
CREATE TABLE `wu_type` (
851
  `id` bigint(20) NOT NULL,
852
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
853
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
854
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
855
  `classId` bigint(20) DEFAULT NULL,
856
  `projectInstanceId` bigint(20) DEFAULT NULL
857
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
858

    
859
-- --------------------------------------------------------
860

    
861
--
862
-- Table structure for table `wu_type_classification`
863
--
864

    
865
CREATE TABLE `wu_type_classification` (
866
  `id` bigint(20) NOT NULL,
867
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
868
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
869

    
870
-- --------------------------------------------------------
871

    
872
--
873
-- Structure for view `artifactView`
874
--
875
DROP TABLE IF EXISTS `artifactView`;
876

    
877
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `artifactView`  AS SELECT `wi`.`name` AS `name`, `wi`.`description` AS `description`, `wi`.`created` AS `created`, `wi`.`url` AS `url`, `a`.`id` AS `id`, `a`.`artifactClass` AS `artifactClass`, `a`.`mimeType` AS `mimeType`, `a`.`size` AS `size`, `p`.`id` AS `authorId`, `p`.`name` AS `authorName`, `p`.`projectId` AS `projectId` FROM ((`work_item` `wi` join `artifact` `a` on(`a`.`id` = `wi`.`id`)) join `personView` `p` on(`p`.`id` = `wi`.`authorId`)) ;
878

    
879
-- --------------------------------------------------------
880

    
881
--
882
-- Structure for view `commitedConfigView`
883
--
884
DROP TABLE IF EXISTS `commitedConfigView`;
885

    
886
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `commitedConfigView`  AS SELECT `c`.`id` AS `id`, `c`.`type` AS `type`, `c`.`name` AS `name`, `c`.`description` AS `description`, `c`.`created` AS `created`, `c`.`authorId` AS `authorId`, `c`.`authorName` AS `authorName`, `c`.`relationName` AS `relationName`, `c`.`relatedId` AS `relatedId`, `c`.`relatedName` AS `relatedName`, `c`.`projectId` AS `projectId`, `cc`.`committed` AS `committed` FROM (`configurationView` `c` join `committed_configuration` `cc` on(`c`.`id` = `cc`.`id`)) ;
887

    
888
-- --------------------------------------------------------
889

    
890
--
891
-- Structure for view `commitView`
892
--
893
DROP TABLE IF EXISTS `commitView`;
894

    
895
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `commitView`  AS SELECT `cc`.`id` AS `id`, `cc`.`type` AS `type`, `cc`.`name` AS `name`, `cc`.`description` AS `description`, `cc`.`created` AS `created`, `cc`.`authorId` AS `authorId`, `cc`.`authorName` AS `authorName`, `cc`.`relationName` AS `relationName`, `cc`.`relatedId` AS `relatedId`, `cc`.`relatedName` AS `relatedName`, `cc`.`projectId` AS `projectId`, `cc`.`committed` AS `committed`, `cm`.`isRelease` AS `isRelease`, `tg`.`name` AS `tag`, `br`.`name` AS `branch`, `br`.`isMain` AS `main` FROM ((((`commitedConfigView` `cc` join `commit` `cm` on(`cc`.`id` = `cm`.`id`)) left join `tag` `tg` on(`cm`.`id` = `tg`.`configurationId`)) join `configuration_branch` `cfbr` on(`cfbr`.`configurationId` = `cm`.`id`)) join `branch` `br` on(`br`.`id` = `cfbr`.`branchId`)) ;
896

    
897
-- --------------------------------------------------------
898

    
899
--
900
-- Structure for view `configurationView`
901
--
902
DROP TABLE IF EXISTS `configurationView`;
903

    
904
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `configurationView`  AS SELECT `wi`.`id` AS `id`, `wi`.`workItemType` AS `type`, `wi`.`name` AS `name`, `wi`.`description` AS `description`, `wi`.`created` AS `created`, `author`.`id` AS `authorId`, `author`.`name` AS `authorName`, `cpr`.`name` AS `relationName`, `related`.`id` AS `relatedId`, `related`.`name` AS `relatedName`, `c`.`projectId` AS `projectId` FROM ((((`work_item` `wi` join `configuration` `c` on(`c`.`id` = `wi`.`id`)) join `personView` `author` on(`author`.`id` = `wi`.`authorId`)) left join `configuration_person_relation` `cpr` on(`cpr`.`configurationId` = `c`.`id`)) left join `personView` `related` on(`cpr`.`personId` = `related`.`id`)) ;
905

    
906
-- --------------------------------------------------------
907

    
908
--
909
-- Structure for view `fieldChangeView`
910
--
911
DROP TABLE IF EXISTS `fieldChangeView`;
912

    
913
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fieldChangeView`  AS SELECT `conf`.`id` AS `id`, `conf`.`type` AS `type`, `conf`.`name` AS `name`, `conf`.`description` AS `description`, `conf`.`created` AS `created`, `conf`.`authorId` AS `authorId`, `conf`.`authorName` AS `authorName`, `conf`.`relationName` AS `relationName`, `conf`.`relatedId` AS `relatedId`, `conf`.`relatedName` AS `relatedName`, `conf`.`projectId` AS `projectId`, `wchange`.`name` AS `changeName`, `wchange`.`description` AS `changeDesc`, `item`.`id` AS `itemId`, `item`.`workItemType` AS `itemType`, `item`.`name` AS `itemName`, `item`.`description` AS `itemDesc`, `item`.`created` AS `itemCreated`, `fc`.`name` AS `field`, `fc`.`newValue` AS `newValue`, `fc`.`oldValue` AS `oldValue` FROM ((((`configurationView` `conf` left join `configuration_change` `cfc` on(`cfc`.`configurationId` = `conf`.`id`)) left join `work_item_change` `wchange` on(`wchange`.`id` = `cfc`.`changeId`)) left join `field_change` `fc` on(`fc`.`workItemChangeId` = `wchange`.`id`)) join `work_item` `item` on(`wchange`.`workItemId` = `item`.`id`)) ;
914

    
915
-- --------------------------------------------------------
916

    
917
--
918
-- Structure for view `personView`
919
--
920
DROP TABLE IF EXISTS `personView`;
921

    
922
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `personView`  AS SELECT `p`.`id` AS `id`, `p`.`name` AS `name`, `p`.`projectId` AS `projectId` FROM `person` AS `p` ;
923

    
924
-- --------------------------------------------------------
925

    
926
--
927
-- Structure for view `personWithRolesView`
928
--
929
DROP TABLE IF EXISTS `personWithRolesView`;
930

    
931
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `personWithRolesView`  AS SELECT `p`.`id` AS `id`, `p`.`name` AS `name`, `r`.`name` AS `role`, `rc`.`class` AS `roleClass`, `rc`.`superClass` AS `roleSuperClass`, `p`.`projectId` AS `projectId` FROM (((`person` `p` join `person_role` `pr` on(`pr`.`personId` = `p`.`id`)) join `role` `r` on(`r`.`id` = `pr`.`roleId`)) join `role_classification` `rc` on(`rc`.`id` = `r`.`classId`)) ;
932

    
933
-- --------------------------------------------------------
934

    
935
--
936
-- Structure for view `workUnitView`
937
--
938
DROP TABLE IF EXISTS `workUnitView`;
939

    
940
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `workUnitView`  AS SELECT `wi`.`id` AS `id`, `wi`.`name` AS `name`, `wi`.`description` AS `description`, `wi`.`created` AS `created`, `wu`.`dueDate` AS `dueDate`, `wu`.`estimatedTime` AS `estimatedTime`, `wu`.`progress` AS `progress`, `wu`.`spentTime` AS `spentTime`, `wu`.`startDate` AS `startDate`, `wu`.`projectId` AS `projectId`, `author`.`id` AS `authorId`, `author`.`name` AS `authorName`, `assignee`.`id` AS `assigneeId`, `assignee`.`name` AS `assigneeName`, `ac`.`name` AS `activityName`, `ac`.`description` AS `activityDesc`, `ac`.`endDate` AS `activityEndDate`, `ac`.`startDate` AS `activityStartDate`, `it`.`name` AS `iterationName`, `it`.`description` AS `iterationDesc`, `it`.`startDate` AS `iterationStartDate`, `it`.`endDate` AS `iterationEndDate`, `it`.`created` AS `iterationCreated`, `ph`.`name` AS `phaseName`, `ph`.`description` AS `phaseDesc`, `ph`.`startDate` AS `phaseStartDate`, `ph`.`endDate` AS `phaseEndDate`, `ph`.`created` AS `phaseCreated`, `pr`.`name` AS `priorityName`, `pr`.`description` AS `priorityDesc`, `prcl`.`class` AS `prioClass`, `prcl`.`superClass` AS `prioSuperClass`, `ser`.`name` AS `severityName`, `ser`.`description` AS `severityDesc`, `sercl`.`class` AS `severityClass`, `sercl`.`superClass` AS `severitySuperClass`, `res`.`name` AS `resolutionName`, `res`.`description` AS `resolutionDescription`, `rescl`.`class` AS `resolutionClass`, `rescl`.`superClass` AS `resolutionSuperClass`, `st`.`name` AS `statusName`, `st`.`description` AS `statusDescription`, `stcl`.`class` AS `statusClass`, `stcl`.`superClass` AS `statusSuperClass`, `wt`.`name` AS `wuTypeName`, `wt`.`description` AS `wuTypeDescription`, `wtcl`.`class` AS `wuTypeClass`, `ct`.`name` AS `categoryName`, `ct`.`description` AS `categoryDesc` FROM ((((((((((((((((((`work_item` `wi` join `work_unit` `wu` on(`wu`.`id` = `wi`.`id`)) join `personView` `author` on(`wi`.`authorId` = `author`.`id`)) join `personView` `assignee` on(`assignee`.`id` = `wu`.`assigneeId`)) left join `activity` `ac` on(`wu`.`activityId` = `ac`.`id`)) left join `iteration` `it` on(`wu`.`iterationId` = `it`.`id`)) left join `phase` `ph` on(`wu`.`phaseId` = `ph`.`id`)) join `priority` `pr` on(`pr`.`id` = `wu`.`priorityId`)) join `priority_classification` `prcl` on(`prcl`.`id` = `pr`.`classId`)) join `severity` `ser` on(`ser`.`id` = `wu`.`severityId`)) join `severity_classification` `sercl` on(`sercl`.`id` = `ser`.`classId`)) left join `resolution` `res` on(`res`.`id` = `wu`.`resolutionId`)) left join `resolution_classification` `rescl` on(`rescl`.`id` = `res`.`classId`)) join `status` `st` on(`st`.`id` = `wu`.`statusId`)) join `status_classification` `stcl` on(`stcl`.`id` = `st`.`classId`)) join `wu_type` `wt` on(`wt`.`id` = `wu`.`wuTypeId`)) join `wu_type_classification` `wtcl` on(`wtcl`.`id` = `wt`.`classId`)) left join `work_unit_category` `wuc` on(`wuc`.`workUnitId` = `wu`.`id`)) left join `category` `ct` on(`ct`.`id` = `wuc`.`categoryId`)) ;
941

    
942
--
943
-- Indexes for dumped tables
944
--
945

    
946
--
947
-- Indexes for table `activity`
948
--
949
ALTER TABLE `activity`
950
  ADD PRIMARY KEY (`id`),
951
  ADD KEY `FK_blqrry9wsm0foxy0mg00a0epk` (`superProjectId`);
952

    
953
--
954
-- Indexes for table `artifact`
955
--
956
ALTER TABLE `artifact`
957
  ADD PRIMARY KEY (`id`);
958

    
959
--
960
-- Indexes for table `branch`
961
--
962
ALTER TABLE `branch`
963
  ADD PRIMARY KEY (`id`);
964

    
965
--
966
-- Indexes for table `category`
967
--
968
ALTER TABLE `category`
969
  ADD PRIMARY KEY (`id`),
970
  ADD KEY `FK_cpikjj79a9qmnxmo5unps4hsw` (`projectInstanceId`);
971

    
972
--
973
-- Indexes for table `commit`
974
--
975
ALTER TABLE `commit`
976
  ADD PRIMARY KEY (`id`);
977

    
978
--
979
-- Indexes for table `committed_configuration`
980
--
981
ALTER TABLE `committed_configuration`
982
  ADD PRIMARY KEY (`id`);
983

    
984
--
985
-- Indexes for table `competency`
986
--
987
ALTER TABLE `competency`
988
  ADD PRIMARY KEY (`id`);
989

    
990
--
991
-- Indexes for table `configuration`
992
--
993
ALTER TABLE `configuration`
994
  ADD PRIMARY KEY (`id`),
995
  ADD KEY `FK_o7bmirglj65sjrcym8a1ywgwc` (`projectId`);
996

    
997
--
998
-- Indexes for table `configuration_branch`
999
--
1000
ALTER TABLE `configuration_branch`
1001
  ADD KEY `FK_kq1ppnqu72in7ciaiv0qfm7gq` (`branchId`),
1002
  ADD KEY `FK_bvbx76vbqrs4wkix8a4l64mgk` (`configurationId`);
1003

    
1004
--
1005
-- Indexes for table `configuration_change`
1006
--
1007
ALTER TABLE `configuration_change`
1008
  ADD UNIQUE KEY `UK_2vr3gl6l9t320r67yfspg8e16` (`changeId`),
1009
  ADD KEY `FK_b11yrb5xl6ea5lceca8r6eyaq` (`configurationId`);
1010

    
1011
--
1012
-- Indexes for table `configuration_person_relation`
1013
--
1014
ALTER TABLE `configuration_person_relation`
1015
  ADD PRIMARY KEY (`id`),
1016
  ADD KEY `FK_bannhsxpvu262ewrp6aval67i` (`personId`),
1017
  ADD KEY `FK_miwxanxtv7gt3knvsflwncix7` (`configurationId`);
1018

    
1019
--
1020
-- Indexes for table `criterion`
1021
--
1022
ALTER TABLE `criterion`
1023
  ADD PRIMARY KEY (`id`);
1024

    
1025
--
1026
-- Indexes for table `field_change`
1027
--
1028
ALTER TABLE `field_change`
1029
  ADD PRIMARY KEY (`id`),
1030
  ADD KEY `FK_mpcn64kubumdcj69467wdexg6` (`workItemChangeId`);
1031

    
1032
--
1033
-- Indexes for table `group_member`
1034
--
1035
ALTER TABLE `group_member`
1036
  ADD KEY `FK_67y4ufvw9p8w6mt4cp7bwa972` (`memberId`),
1037
  ADD KEY `FK_g639kt1nekbaykgg0pwy8ips8` (`groupId`);
1038

    
1039
--
1040
-- Indexes for table `identity`
1041
--
1042
ALTER TABLE `identity`
1043
  ADD PRIMARY KEY (`id`),
1044
  ADD KEY `FK_ocuj7jp17fw0qcow4o3f8e8o0` (`personId`);
1045

    
1046
--
1047
-- Indexes for table `iteration`
1048
--
1049
ALTER TABLE `iteration`
1050
  ADD PRIMARY KEY (`id`),
1051
  ADD KEY `FK_55okl4mwia1vo7n8q6dsbfr55` (`superProjectId`),
1052
  ADD KEY `FK_bid9cxxcrg3oufp2wc33j1h1e` (`configurationId`);
1053

    
1054
--
1055
-- Indexes for table `milestone`
1056
--
1057
ALTER TABLE `milestone`
1058
  ADD PRIMARY KEY (`id`);
1059

    
1060
--
1061
-- Indexes for table `milestone_criterion`
1062
--
1063
ALTER TABLE `milestone_criterion`
1064
  ADD KEY `FK_j65caq74d17bhsly89kylc3jk` (`criterionId`),
1065
  ADD KEY `FK_hahtmhvat46jgvqn41s98dxdl` (`milestoneId`);
1066

    
1067
--
1068
-- Indexes for table `people_group`
1069
--
1070
ALTER TABLE `people_group`
1071
  ADD PRIMARY KEY (`id`),
1072
  ADD KEY `FK_pif918vt32wbakh9vwaye6ib4` (`projectInstanceId`);
1073

    
1074
--
1075
-- Indexes for table `person`
1076
--
1077
ALTER TABLE `person`
1078
  ADD PRIMARY KEY (`id`),
1079
  ADD KEY `FK_nh5ixvgwp0pxk9k1aafmgaltj` (`projectId`);
1080

    
1081
--
1082
-- Indexes for table `person_competency`
1083
--
1084
ALTER TABLE `person_competency`
1085
  ADD KEY `FK_a8kjcx0bj27oxbni693verap4` (`competencyId`),
1086
  ADD KEY `FK_a8x0e7bl7yfoab8d2asvki1c4` (`personId`);
1087

    
1088
--
1089
-- Indexes for table `person_role`
1090
--
1091
ALTER TABLE `person_role`
1092
  ADD KEY `FK_a7r3tdncdaslk1knqt5hue1hq` (`roleId`),
1093
  ADD KEY `FK_cdyyqtr37aeahm3pe162pdgst` (`personId`);
1094

    
1095
--
1096
-- Indexes for table `phase`
1097
--
1098
ALTER TABLE `phase`
1099
  ADD PRIMARY KEY (`id`),
1100
  ADD KEY `FK_ip37oqdl21wk9oqbgm8ii2eop` (`superProjectId`),
1101
  ADD KEY `FK_bo7xp1rl1h46kxd0xvk9d9cif` (`configurationId`),
1102
  ADD KEY `FK_be0977ugg5npl8dxd87mcn7n5` (`milestoneId`);
1103

    
1104
--
1105
-- Indexes for table `priority`
1106
--
1107
ALTER TABLE `priority`
1108
  ADD PRIMARY KEY (`id`),
1109
  ADD KEY `FK_qpy5gsqj4wu6lavuh3biip56v` (`classId`),
1110
  ADD KEY `FK_6w6jf1op7pi7pb2xojyg6jakq` (`projectInstanceId`);
1111

    
1112
--
1113
-- Indexes for table `priority_classification`
1114
--
1115
ALTER TABLE `priority_classification`
1116
  ADD PRIMARY KEY (`id`);
1117

    
1118
--
1119
-- Indexes for table `program`
1120
--
1121
ALTER TABLE `program`
1122
  ADD PRIMARY KEY (`id`);
1123

    
1124
--
1125
-- Indexes for table `project`
1126
--
1127
ALTER TABLE `project`
1128
  ADD PRIMARY KEY (`id`),
1129
  ADD KEY `FK_s45m7qvl6bbm8be5olfwc9n0r` (`superProjectId`);
1130

    
1131
--
1132
-- Indexes for table `project_instance`
1133
--
1134
ALTER TABLE `project_instance`
1135
  ADD PRIMARY KEY (`id`),
1136
  ADD KEY `FK_d16nrgrtg46ln2r8qfc4kqaye` (`projectId`),
1137
  ADD KEY `FK_l9bmcaixavuekut7gfi5up1dc` (`toolInstanceId`);
1138

    
1139
--
1140
-- Indexes for table `relation`
1141
--
1142
ALTER TABLE `relation`
1143
  ADD PRIMARY KEY (`id`),
1144
  ADD KEY `FK_ggp4ppf3qtr9gtpo1je8p8who` (`classId`),
1145
  ADD KEY `FK_lqcwy0o733b26w312lmp0nliw` (`projectInstanceId`);
1146

    
1147
--
1148
-- Indexes for table `relation_classification`
1149
--
1150
ALTER TABLE `relation_classification`
1151
  ADD PRIMARY KEY (`id`);
1152

    
1153
--
1154
-- Indexes for table `resolution`
1155
--
1156
ALTER TABLE `resolution`
1157
  ADD PRIMARY KEY (`id`),
1158
  ADD KEY `FK_au7be5w5c1wmlvr1sy0s0bro7` (`classId`),
1159
  ADD KEY `FK_74tplny25hv0k9wsji0mb0u94` (`projectInstanceId`);
1160

    
1161
--
1162
-- Indexes for table `resolution_classification`
1163
--
1164
ALTER TABLE `resolution_classification`
1165
  ADD PRIMARY KEY (`id`);
1166

    
1167
--
1168
-- Indexes for table `role`
1169
--
1170
ALTER TABLE `role`
1171
  ADD PRIMARY KEY (`id`),
1172
  ADD KEY `FK_g50l5oh7otkun3cwrkx32o1el` (`classId`),
1173
  ADD KEY `FK_nbulk1gvi6k2hi1s21dcbn973` (`projectInstanceId`);
1174

    
1175
--
1176
-- Indexes for table `role_classification`
1177
--
1178
ALTER TABLE `role_classification`
1179
  ADD PRIMARY KEY (`id`);
1180

    
1181
--
1182
-- Indexes for table `severity`
1183
--
1184
ALTER TABLE `severity`
1185
  ADD PRIMARY KEY (`id`),
1186
  ADD KEY `FK_ee5mdcxuy7b3jl1tg4hstv7av` (`classId`),
1187
  ADD KEY `FK_9155uwikqouv9vahj5y02jgq0` (`projectInstanceId`);
1188

    
1189
--
1190
-- Indexes for table `severity_classification`
1191
--
1192
ALTER TABLE `severity_classification`
1193
  ADD PRIMARY KEY (`id`);
1194

    
1195
--
1196
-- Indexes for table `status`
1197
--
1198
ALTER TABLE `status`
1199
  ADD PRIMARY KEY (`id`),
1200
  ADD KEY `FK_4ipxdl1fixo7gorjnjf1vtebu` (`classId`),
1201
  ADD KEY `FK_m16n7o8v21c1x7l9bimxfcaiu` (`projectInstanceId`);
1202

    
1203
--
1204
-- Indexes for table `status_classification`
1205
--
1206
ALTER TABLE `status_classification`
1207
  ADD PRIMARY KEY (`id`);
1208

    
1209
--
1210
-- Indexes for table `tag`
1211
--
1212
ALTER TABLE `tag`
1213
  ADD PRIMARY KEY (`id`),
1214
  ADD KEY `FK_m07et5iue1u1mebbdvxi40430` (`configurationId`);
1215

    
1216
--
1217
-- Indexes for table `tool_instance`
1218
--
1219
ALTER TABLE `tool_instance`
1220
  ADD PRIMARY KEY (`id`);
1221

    
1222
--
1223
-- Indexes for table `work_item`
1224
--
1225
ALTER TABLE `work_item`
1226
  ADD PRIMARY KEY (`id`),
1227
  ADD KEY `FK_grormlstxeqy8q0kuiul86oti` (`authorId`);
1228

    
1229
--
1230
-- Indexes for table `work_item_change`
1231
--
1232
ALTER TABLE `work_item_change`
1233
  ADD PRIMARY KEY (`id`),
1234
  ADD KEY `FK_eqs2goyddmd6gps1ua15jn4y7` (`workItemId`);
1235

    
1236
--
1237
-- Indexes for table `work_item_relation`
1238
--
1239
ALTER TABLE `work_item_relation`
1240
  ADD PRIMARY KEY (`id`),
1241
  ADD KEY `FK_3ggc732qs69geici6kmfq8tir` (`rightItemId`),
1242
  ADD KEY `FK_65qc19uvlwf5kk99nrqn4g4x4` (`relationId`),
1243
  ADD KEY `FK_7o6onl1fkxry7lunkllomq6py` (`leftItemId`);
1244

    
1245
--
1246
-- Indexes for table `work_unit`
1247
--
1248
ALTER TABLE `work_unit`
1249
  ADD PRIMARY KEY (`id`),
1250
  ADD KEY `FK_hapc5vkbtxaottwycluaohfhk` (`activityId`),
1251
  ADD KEY `FK_bg8wdau2p07tbijinx445xyxc` (`assigneeId`),
1252
  ADD KEY `FK_dw94wosdhq0lf0j1eebs7c096` (`iterationId`),
1253
  ADD KEY `FK_kpa354soynck8d9v16bx29wqr` (`phaseId`),
1254
  ADD KEY `FK_gub58igbd2kmb4swfs16ed7te` (`priorityId`),
1255
  ADD KEY `FK_8pjjfib3dfnt6wdkqvs6w2ohk` (`resolutionId`),
1256
  ADD KEY `FK_hdtowjwpdbi5iq0iqkurnsicv` (`severityId`),
1257
  ADD KEY `FK_332c0iln6b790nmcowr7li152` (`statusId`),
1258
  ADD KEY `FK_l7yf2722dfp6wu8mcvl7lu024` (`wuTypeId`),
1259
  ADD KEY `FK_aui0kjlc2ileby8e4toik9pq4` (`projectId`);
1260

    
1261
--
1262
-- Indexes for table `work_unit_category`
1263
--
1264
ALTER TABLE `work_unit_category`
1265
  ADD KEY `FK_gikg1399mwbk4aqit3bl7t7mc` (`categoryId`),
1266
  ADD KEY `FK_9esb50fgqu304q0paecd3j0p1` (`workUnitId`);
1267

    
1268
--
1269
-- Indexes for table `wu_type`
1270
--
1271
ALTER TABLE `wu_type`
1272
  ADD PRIMARY KEY (`id`),
1273
  ADD KEY `FK_kltfeqj1it4r8vgucs9uwg578` (`classId`),
1274
  ADD KEY `FK_kdcm0gbg2748gs96dj6tadc6w` (`projectInstanceId`);
1275

    
1276
--
1277
-- Indexes for table `wu_type_classification`
1278
--
1279
ALTER TABLE `wu_type_classification`
1280
  ADD PRIMARY KEY (`id`);
1281

    
1282
--
1283
-- AUTO_INCREMENT for dumped tables
1284
--
1285

    
1286
--
1287
-- AUTO_INCREMENT for table `activity`
1288
--
1289
ALTER TABLE `activity`
1290
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1291

    
1292
--
1293
-- AUTO_INCREMENT for table `branch`
1294
--
1295
ALTER TABLE `branch`
1296
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1297

    
1298
--
1299
-- AUTO_INCREMENT for table `category`
1300
--
1301
ALTER TABLE `category`
1302
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1303

    
1304
--
1305
-- AUTO_INCREMENT for table `competency`
1306
--
1307
ALTER TABLE `competency`
1308
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1309

    
1310
--
1311
-- AUTO_INCREMENT for table `configuration_person_relation`
1312
--
1313
ALTER TABLE `configuration_person_relation`
1314
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1315

    
1316
--
1317
-- AUTO_INCREMENT for table `criterion`
1318
--
1319
ALTER TABLE `criterion`
1320
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1321

    
1322
--
1323
-- AUTO_INCREMENT for table `field_change`
1324
--
1325
ALTER TABLE `field_change`
1326
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1327

    
1328
--
1329
-- AUTO_INCREMENT for table `identity`
1330
--
1331
ALTER TABLE `identity`
1332
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1333

    
1334
--
1335
-- AUTO_INCREMENT for table `iteration`
1336
--
1337
ALTER TABLE `iteration`
1338
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1339

    
1340
--
1341
-- AUTO_INCREMENT for table `milestone`
1342
--
1343
ALTER TABLE `milestone`
1344
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1345

    
1346
--
1347
-- AUTO_INCREMENT for table `people_group`
1348
--
1349
ALTER TABLE `people_group`
1350
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1351

    
1352
--
1353
-- AUTO_INCREMENT for table `person`
1354
--
1355
ALTER TABLE `person`
1356
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1357

    
1358
--
1359
-- AUTO_INCREMENT for table `phase`
1360
--
1361
ALTER TABLE `phase`
1362
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1363

    
1364
--
1365
-- AUTO_INCREMENT for table `priority`
1366
--
1367
ALTER TABLE `priority`
1368
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1369

    
1370
--
1371
-- AUTO_INCREMENT for table `priority_classification`
1372
--
1373
ALTER TABLE `priority_classification`
1374
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1375

    
1376
--
1377
-- AUTO_INCREMENT for table `project`
1378
--
1379
ALTER TABLE `project`
1380
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1381

    
1382
--
1383
-- AUTO_INCREMENT for table `project_instance`
1384
--
1385
ALTER TABLE `project_instance`
1386
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1387

    
1388
--
1389
-- AUTO_INCREMENT for table `relation`
1390
--
1391
ALTER TABLE `relation`
1392
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1393

    
1394
--
1395
-- AUTO_INCREMENT for table `relation_classification`
1396
--
1397
ALTER TABLE `relation_classification`
1398
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1399

    
1400
--
1401
-- AUTO_INCREMENT for table `resolution`
1402
--
1403
ALTER TABLE `resolution`
1404
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1405

    
1406
--
1407
-- AUTO_INCREMENT for table `resolution_classification`
1408
--
1409
ALTER TABLE `resolution_classification`
1410
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1411

    
1412
--
1413
-- AUTO_INCREMENT for table `role`
1414
--
1415
ALTER TABLE `role`
1416
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1417

    
1418
--
1419
-- AUTO_INCREMENT for table `role_classification`
1420
--
1421
ALTER TABLE `role_classification`
1422
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1423

    
1424
--
1425
-- AUTO_INCREMENT for table `severity`
1426
--
1427
ALTER TABLE `severity`
1428
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1429

    
1430
--
1431
-- AUTO_INCREMENT for table `severity_classification`
1432
--
1433
ALTER TABLE `severity_classification`
1434
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1435

    
1436
--
1437
-- AUTO_INCREMENT for table `status`
1438
--
1439
ALTER TABLE `status`
1440
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1441

    
1442
--
1443
-- AUTO_INCREMENT for table `status_classification`
1444
--
1445
ALTER TABLE `status_classification`
1446
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1447

    
1448
--
1449
-- AUTO_INCREMENT for table `tag`
1450
--
1451
ALTER TABLE `tag`
1452
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1453

    
1454
--
1455
-- AUTO_INCREMENT for table `tool_instance`
1456
--
1457
ALTER TABLE `tool_instance`
1458
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1459

    
1460
--
1461
-- AUTO_INCREMENT for table `work_item`
1462
--
1463
ALTER TABLE `work_item`
1464
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1465

    
1466
--
1467
-- AUTO_INCREMENT for table `work_item_change`
1468
--
1469
ALTER TABLE `work_item_change`
1470
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1471

    
1472
--
1473
-- AUTO_INCREMENT for table `work_item_relation`
1474
--
1475
ALTER TABLE `work_item_relation`
1476
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1477

    
1478
--
1479
-- AUTO_INCREMENT for table `wu_type`
1480
--
1481
ALTER TABLE `wu_type`
1482
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1483

    
1484
--
1485
-- AUTO_INCREMENT for table `wu_type_classification`
1486
--
1487
ALTER TABLE `wu_type_classification`
1488
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
1489

    
1490
--
1491
-- Constraints for dumped tables
1492
--
1493

    
1494
--
1495
-- Constraints for table `activity`
1496
--
1497
ALTER TABLE `activity`
1498
  ADD CONSTRAINT `FK_blqrry9wsm0foxy0mg00a0epk` FOREIGN KEY (`superProjectId`) REFERENCES `project` (`id`);
1499

    
1500
--
1501
-- Constraints for table `artifact`
1502
--
1503
ALTER TABLE `artifact`
1504
  ADD CONSTRAINT `FK_rw4j86aih7ao55ljy9bhaexgj` FOREIGN KEY (`id`) REFERENCES `work_item` (`id`);
1505

    
1506
--
1507
-- Constraints for table `category`
1508
--
1509
ALTER TABLE `category`
1510
  ADD CONSTRAINT `FK_cpikjj79a9qmnxmo5unps4hsw` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`);
1511

    
1512
--
1513
-- Constraints for table `commit`
1514
--
1515
ALTER TABLE `commit`
1516
  ADD CONSTRAINT `FK_nf03tfesxrvrfrkhqhykkjaxo` FOREIGN KEY (`id`) REFERENCES `committed_configuration` (`id`);
1517

    
1518
--
1519
-- Constraints for table `committed_configuration`
1520
--
1521
ALTER TABLE `committed_configuration`
1522
  ADD CONSTRAINT `FK_sfu3uuxhnjmgbca2pwkwv9iyh` FOREIGN KEY (`id`) REFERENCES `configuration` (`id`);
1523

    
1524
--
1525
-- Constraints for table `configuration`
1526
--
1527
ALTER TABLE `configuration`
1528
  ADD CONSTRAINT `FK_o7bmirglj65sjrcym8a1ywgwc` FOREIGN KEY (`projectId`) REFERENCES `project` (`id`),
1529
  ADD CONSTRAINT `FK_q1y4xb3dkmkvadurm574ago0j` FOREIGN KEY (`id`) REFERENCES `work_item` (`id`);
1530

    
1531
--
1532
-- Constraints for table `configuration_branch`
1533
--
1534
ALTER TABLE `configuration_branch`
1535
  ADD CONSTRAINT `FK_bvbx76vbqrs4wkix8a4l64mgk` FOREIGN KEY (`configurationId`) REFERENCES `commit` (`id`),
1536
  ADD CONSTRAINT `FK_kq1ppnqu72in7ciaiv0qfm7gq` FOREIGN KEY (`branchId`) REFERENCES `branch` (`id`);
1537

    
1538
--
1539
-- Constraints for table `configuration_change`
1540
--
1541
ALTER TABLE `configuration_change`
1542
  ADD CONSTRAINT `FK_2vr3gl6l9t320r67yfspg8e16` FOREIGN KEY (`changeId`) REFERENCES `work_item_change` (`id`),
1543
  ADD CONSTRAINT `FK_b11yrb5xl6ea5lceca8r6eyaq` FOREIGN KEY (`configurationId`) REFERENCES `configuration` (`id`);
1544

    
1545
--
1546
-- Constraints for table `configuration_person_relation`
1547
--
1548
ALTER TABLE `configuration_person_relation`
1549
  ADD CONSTRAINT `FK_bannhsxpvu262ewrp6aval67i` FOREIGN KEY (`personId`) REFERENCES `person` (`id`),
1550
  ADD CONSTRAINT `FK_miwxanxtv7gt3knvsflwncix7` FOREIGN KEY (`configurationId`) REFERENCES `commit` (`id`);
1551

    
1552
--
1553
-- Constraints for table `field_change`
1554
--
1555
ALTER TABLE `field_change`
1556
  ADD CONSTRAINT `FK_mpcn64kubumdcj69467wdexg6` FOREIGN KEY (`workItemChangeId`) REFERENCES `work_item_change` (`id`);
1557

    
1558
--
1559
-- Constraints for table `group_member`
1560
--
1561
ALTER TABLE `group_member`
1562
  ADD CONSTRAINT `FK_67y4ufvw9p8w6mt4cp7bwa972` FOREIGN KEY (`memberId`) REFERENCES `person` (`id`),
1563
  ADD CONSTRAINT `FK_g639kt1nekbaykgg0pwy8ips8` FOREIGN KEY (`groupId`) REFERENCES `people_group` (`id`);
1564

    
1565
--
1566
-- Constraints for table `identity`
1567
--
1568
ALTER TABLE `identity`
1569
  ADD CONSTRAINT `FK_ocuj7jp17fw0qcow4o3f8e8o0` FOREIGN KEY (`personId`) REFERENCES `person` (`id`);
1570

    
1571
--
1572
-- Constraints for table `iteration`
1573
--
1574
ALTER TABLE `iteration`
1575
  ADD CONSTRAINT `FK_55okl4mwia1vo7n8q6dsbfr55` FOREIGN KEY (`superProjectId`) REFERENCES `project` (`id`),
1576
  ADD CONSTRAINT `FK_bid9cxxcrg3oufp2wc33j1h1e` FOREIGN KEY (`configurationId`) REFERENCES `commit` (`id`);
1577

    
1578
--
1579
-- Constraints for table `milestone_criterion`
1580
--
1581
ALTER TABLE `milestone_criterion`
1582
  ADD CONSTRAINT `FK_hahtmhvat46jgvqn41s98dxdl` FOREIGN KEY (`milestoneId`) REFERENCES `milestone` (`id`),
1583
  ADD CONSTRAINT `FK_j65caq74d17bhsly89kylc3jk` FOREIGN KEY (`criterionId`) REFERENCES `criterion` (`id`);
1584

    
1585
--
1586
-- Constraints for table `people_group`
1587
--
1588
ALTER TABLE `people_group`
1589
  ADD CONSTRAINT `FK_pif918vt32wbakh9vwaye6ib4` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`);
1590

    
1591
--
1592
-- Constraints for table `person`
1593
--
1594
ALTER TABLE `person`
1595
  ADD CONSTRAINT `FK_nh5ixvgwp0pxk9k1aafmgaltj` FOREIGN KEY (`projectId`) REFERENCES `project` (`id`);
1596

    
1597
--
1598
-- Constraints for table `person_competency`
1599
--
1600
ALTER TABLE `person_competency`
1601
  ADD CONSTRAINT `FK_a8kjcx0bj27oxbni693verap4` FOREIGN KEY (`competencyId`) REFERENCES `competency` (`id`),
1602
  ADD CONSTRAINT `FK_a8x0e7bl7yfoab8d2asvki1c4` FOREIGN KEY (`personId`) REFERENCES `person` (`id`);
1603

    
1604
--
1605
-- Constraints for table `person_role`
1606
--
1607
ALTER TABLE `person_role`
1608
  ADD CONSTRAINT `FK_a7r3tdncdaslk1knqt5hue1hq` FOREIGN KEY (`roleId`) REFERENCES `role` (`id`),
1609
  ADD CONSTRAINT `FK_cdyyqtr37aeahm3pe162pdgst` FOREIGN KEY (`personId`) REFERENCES `person` (`id`);
1610

    
1611
--
1612
-- Constraints for table `phase`
1613
--
1614
ALTER TABLE `phase`
1615
  ADD CONSTRAINT `FK_be0977ugg5npl8dxd87mcn7n5` FOREIGN KEY (`milestoneId`) REFERENCES `milestone` (`id`),
1616
  ADD CONSTRAINT `FK_bo7xp1rl1h46kxd0xvk9d9cif` FOREIGN KEY (`configurationId`) REFERENCES `commit` (`id`),
1617
  ADD CONSTRAINT `FK_ip37oqdl21wk9oqbgm8ii2eop` FOREIGN KEY (`superProjectId`) REFERENCES `project` (`id`);
1618

    
1619
--
1620
-- Constraints for table `priority`
1621
--
1622
ALTER TABLE `priority`
1623
  ADD CONSTRAINT `FK_6w6jf1op7pi7pb2xojyg6jakq` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`),
1624
  ADD CONSTRAINT `FK_qpy5gsqj4wu6lavuh3biip56v` FOREIGN KEY (`classId`) REFERENCES `priority_classification` (`id`);
1625

    
1626
--
1627
-- Constraints for table `program`
1628
--
1629
ALTER TABLE `program`
1630
  ADD CONSTRAINT `FK_i9n77wvkvre5cxu7eiqsfqup9` FOREIGN KEY (`id`) REFERENCES `project` (`id`);
1631

    
1632
--
1633
-- Constraints for table `project`
1634
--
1635
ALTER TABLE `project`
1636
  ADD CONSTRAINT `FK_s45m7qvl6bbm8be5olfwc9n0r` FOREIGN KEY (`superProjectId`) REFERENCES `project` (`id`);
1637

    
1638
--
1639
-- Constraints for table `project_instance`
1640
--
1641
ALTER TABLE `project_instance`
1642
  ADD CONSTRAINT `FK_d16nrgrtg46ln2r8qfc4kqaye` FOREIGN KEY (`projectId`) REFERENCES `project` (`id`),
1643
  ADD CONSTRAINT `FK_l9bmcaixavuekut7gfi5up1dc` FOREIGN KEY (`toolInstanceId`) REFERENCES `tool_instance` (`id`);
1644

    
1645
--
1646
-- Constraints for table `relation`
1647
--
1648
ALTER TABLE `relation`
1649
  ADD CONSTRAINT `FK_ggp4ppf3qtr9gtpo1je8p8who` FOREIGN KEY (`classId`) REFERENCES `relation_classification` (`id`),
1650
  ADD CONSTRAINT `FK_lqcwy0o733b26w312lmp0nliw` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`);
1651

    
1652
--
1653
-- Constraints for table `resolution`
1654
--
1655
ALTER TABLE `resolution`
1656
  ADD CONSTRAINT `FK_74tplny25hv0k9wsji0mb0u94` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`),
1657
  ADD CONSTRAINT `FK_au7be5w5c1wmlvr1sy0s0bro7` FOREIGN KEY (`classId`) REFERENCES `resolution_classification` (`id`);
1658

    
1659
--
1660
-- Constraints for table `role`
1661
--
1662
ALTER TABLE `role`
1663
  ADD CONSTRAINT `FK_g50l5oh7otkun3cwrkx32o1el` FOREIGN KEY (`classId`) REFERENCES `role_classification` (`id`),
1664
  ADD CONSTRAINT `FK_nbulk1gvi6k2hi1s21dcbn973` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`);
1665

    
1666
--
1667
-- Constraints for table `severity`
1668
--
1669
ALTER TABLE `severity`
1670
  ADD CONSTRAINT `FK_9155uwikqouv9vahj5y02jgq0` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`),
1671
  ADD CONSTRAINT `FK_ee5mdcxuy7b3jl1tg4hstv7av` FOREIGN KEY (`classId`) REFERENCES `severity_classification` (`id`);
1672

    
1673
--
1674
-- Constraints for table `status`
1675
--
1676
ALTER TABLE `status`
1677
  ADD CONSTRAINT `FK_4ipxdl1fixo7gorjnjf1vtebu` FOREIGN KEY (`classId`) REFERENCES `status_classification` (`id`),
1678
  ADD CONSTRAINT `FK_m16n7o8v21c1x7l9bimxfcaiu` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`);
1679

    
1680
--
1681
-- Constraints for table `tag`
1682
--
1683
ALTER TABLE `tag`
1684
  ADD CONSTRAINT `FK_m07et5iue1u1mebbdvxi40430` FOREIGN KEY (`configurationId`) REFERENCES `commit` (`id`);
1685

    
1686
--
1687
-- Constraints for table `work_item`
1688
--
1689
ALTER TABLE `work_item`
1690
  ADD CONSTRAINT `FK_grormlstxeqy8q0kuiul86oti` FOREIGN KEY (`authorId`) REFERENCES `person` (`id`);
1691

    
1692
--
1693
-- Constraints for table `work_item_change`
1694
--
1695
ALTER TABLE `work_item_change`
1696
  ADD CONSTRAINT `FK_eqs2goyddmd6gps1ua15jn4y7` FOREIGN KEY (`workItemId`) REFERENCES `work_item` (`id`);
1697

    
1698
--
1699
-- Constraints for table `work_item_relation`
1700
--
1701
ALTER TABLE `work_item_relation`
1702
  ADD CONSTRAINT `FK_3ggc732qs69geici6kmfq8tir` FOREIGN KEY (`rightItemId`) REFERENCES `work_item` (`id`),
1703
  ADD CONSTRAINT `FK_65qc19uvlwf5kk99nrqn4g4x4` FOREIGN KEY (`relationId`) REFERENCES `relation` (`id`),
1704
  ADD CONSTRAINT `FK_7o6onl1fkxry7lunkllomq6py` FOREIGN KEY (`leftItemId`) REFERENCES `work_item` (`id`);
1705

    
1706
--
1707
-- Constraints for table `work_unit`
1708
--
1709
ALTER TABLE `work_unit`
1710
  ADD CONSTRAINT `FK_332c0iln6b790nmcowr7li152` FOREIGN KEY (`statusId`) REFERENCES `status` (`id`),
1711
  ADD CONSTRAINT `FK_8pjjfib3dfnt6wdkqvs6w2ohk` FOREIGN KEY (`resolutionId`) REFERENCES `resolution` (`id`),
1712
  ADD CONSTRAINT `FK_aui0kjlc2ileby8e4toik9pq4` FOREIGN KEY (`projectId`) REFERENCES `project` (`id`),
1713
  ADD CONSTRAINT `FK_bg8wdau2p07tbijinx445xyxc` FOREIGN KEY (`assigneeId`) REFERENCES `person` (`id`),
1714
  ADD CONSTRAINT `FK_dw94wosdhq0lf0j1eebs7c096` FOREIGN KEY (`iterationId`) REFERENCES `iteration` (`id`),
1715
  ADD CONSTRAINT `FK_gub58igbd2kmb4swfs16ed7te` FOREIGN KEY (`priorityId`) REFERENCES `priority` (`id`),
1716
  ADD CONSTRAINT `FK_hapc5vkbtxaottwycluaohfhk` FOREIGN KEY (`activityId`) REFERENCES `activity` (`id`),
1717
  ADD CONSTRAINT `FK_hdtowjwpdbi5iq0iqkurnsicv` FOREIGN KEY (`severityId`) REFERENCES `severity` (`id`),
1718
  ADD CONSTRAINT `FK_kpa354soynck8d9v16bx29wqr` FOREIGN KEY (`phaseId`) REFERENCES `phase` (`id`),
1719
  ADD CONSTRAINT `FK_l7yf2722dfp6wu8mcvl7lu024` FOREIGN KEY (`wuTypeId`) REFERENCES `wu_type` (`id`),
1720
  ADD CONSTRAINT `FK_qhiwrpysllugj9omo1r2faqt4` FOREIGN KEY (`id`) REFERENCES `work_item` (`id`);
1721

    
1722
--
1723
-- Constraints for table `work_unit_category`
1724
--
1725
ALTER TABLE `work_unit_category`
1726
  ADD CONSTRAINT `FK_9esb50fgqu304q0paecd3j0p1` FOREIGN KEY (`workUnitId`) REFERENCES `work_unit` (`id`),
1727
  ADD CONSTRAINT `FK_gikg1399mwbk4aqit3bl7t7mc` FOREIGN KEY (`categoryId`) REFERENCES `category` (`id`);
1728

    
1729
--
1730
-- Constraints for table `wu_type`
1731
--
1732
ALTER TABLE `wu_type`
1733
  ADD CONSTRAINT `FK_kdcm0gbg2748gs96dj6tadc6w` FOREIGN KEY (`projectInstanceId`) REFERENCES `project_instance` (`id`),
1734
  ADD CONSTRAINT `FK_kltfeqj1it4r8vgucs9uwg578` FOREIGN KEY (`classId`) REFERENCES `wu_type_classification` (`id`);
1735
COMMIT;
1736

    
1737
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1738
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1739
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1740

    
1741
create or replace view artifactView as select wi.name, wi.description, wi.created, wi.url, a.id as id, a.artifactClass, a.mimeType, a.size, p.id as authorId, p.name as authorName, p.projectId from work_item wi join artifact a on a.id = wi.id join personView p on p.id = wi.authorId;
(5-5/10)