Projekt

Obecné

Profil

« Předchozí | Další » 

Revize c9d1085d

Přidáno uživatelem Petr Urban před téměř 2 roky(ů)

#10648 refaktor potřebných změn v DB skriptech a konfiguračních services a controlleru + přehození umístění db skriptů

Zobrazit rozdíly:

db/db.app_metadata_createTable.sql
1
if not exists (select * from sysobjects where name='app_metadata' and xtype='U')
2

  
3
    create table app_metadata (
4
        id int identity(1, 1),
5
        appDataKey nvarchar(255),
6
        appDataValue nvarchar(max)
7
    )
8

  
9
    go
10

  
11
insert into app_metadata (appDataKey, appDataValue)
12
    values
13
        ('basics', N'[
14
          {
15
            "version": "1.0.0",
16
            "authors": [
17
              {
18
                "name": "Ondřej Váně",
19
                "email": "vaneo@students.zcu.cz"
20
              }
21
            ],
22
            "description": "This application is used to detect presence of anti-patterns in project management tools data. Seven selected anti-patterns are implemented in this application."
23
          },
24
          {
25
            "version": "1.1.0",
26
            "authors": [
27
              {
28
                "name": "Ondřej Váně",
29
                "email": "vaneo@students.zcu.cz"
30
              }
31
            ],
32
            "description": "This application is used to detect presence of anti-patterns in project management tools data. Seven selected anti-patterns are implemented in this application."
33
          },
34
          {
35
            "version": "1.2.0",
36
            "authors": [
37
              {
38
                "name": "Petr Štěpánek",
39
                "email": "petrs1@students.zcu.cz"
40
              }
41
            ],
42
            "description": "This application is used to detect presence of anti-patterns in project management tools data. Ten selected anti-patterns are implemented in this application."
43
          },
44
          {
45
            "version": "2.0.0",
46
            "authors": [
47
              {
48
                "name": "Petr Štěpánek",
49
                "email": "petrs1@students.zcu.cz"
50
              },
51
              {
52
                "name": "Petr Urban",
53
                "email": "urbanp@students.zcu.cz"
54
              },
55
              {
56
                "name": "Jiří Trefil",
57
                "email": "trefil@students.zcu.cz"
58
              },
59
              {
60
                "name": "Václav Hrabík",
61
                "email": "hrabikv@students.zcu.cz"
62
              }
63
            ],
64
            "description": "TODO"
65
          }
66
        ]')
67

  
db/spade-config.sql
1
USE spade;
2
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
db/spade-configurations.sql
1
use [authspade];
2
begin transaction create_enviroment
3
if not exists (select * from sysobjects where name='configurations' and xtype='U')
4
create table configurations (
5
	id int identity(1, 1),
6
	configHash nvarchar(255),
7
	config nvarchar(max) not null,
8
	isDefault char(1) not null,
9
	PRIMARY KEY(id)
10
);
11

  
12
if not exists (select * from sysobjects where name='users' and xtype='U')
13
create table users(
14
id int identity(1,1),
15
email nvarchar(255) not null,
16
name nvarchar(255) not null,
17
password varchar(255) not null
18
PRIMARY KEY(id)
19
);
20
--declare @userId as int
21
insert into users(email,name,password) values('default@user.com','default','2747CABBB481A433679F6DC8AAE833DD1B64452778B97E2729BD3C54DEDE0886')
22
--set @userId = (select id from users where name='default')
23
--rozkladova tabulka mapujici uzivatele a k nemu asociovane konfigurace
24
if not exists (select * from sysobjects where name='user_configurations' and xtype='U')
25
create table user_configurations (
26
	userId int not null,
27
	configId int not null,
28
    configurationName nvarchar(255) not null,
29
	foreign key(userId) references users(id),
30
	foreign key(configId) references configurations(id),
31
	primary key(userId,configId)
32
)
33

  
34
insert into configurations (config, isDefault) values (
35
	'{
36
    "configuration": [
37
        {
38
            "antiPattern": "TooLongSprint",
39
            "thresholds": [
40
                {
41
                    "thresholdName": "maxIterationLength",
42
                    "value": "21"
43
                },
44
                {
45
                    "thresholdName": "maxNumberOfTooLongIterations",
46
                    "value": "0"
47
                }
48
            ]
49
        },
50
        {
51
            "antiPattern": "VaryingSprintLength",
52
            "thresholds": [
53
                {
54
                    "thresholdName": "maxDaysDifference",
55
                    "value": "7"
56
                },
57
                {
58
                    "thresholdName": "maxIterationChanged",
59
                    "value": "1"
60
                }
61
            ]
62
        },
63
        {
64
            "antiPattern": "BusinessAsUsual",
65
            "thresholds": [
66
                {
67
                    "thresholdName": "divisionOfIterationsWithRetrospective",
68
                    "value": "66.66f"
69
                },
70
                {
71
                    "thresholdName": "searchSubstringsWithRetrospective",
72
                    "value": "%retr%||%revi%||%week%scrum%"
73
                }
74
            ]
75
        },
76
        {
77
            "antiPattern": "SpecifyNothing",
78
            "thresholds": [
79
                {
80
                    "thresholdName": "minNumberOfWikiPagesWithSpecification",
81
                    "value": "1"
82
                },
83
                {
84
                    "thresholdName": "minNumberOfActivitiesWithSpecification",
85
                    "value": "1"
86
                },
87
                {
88
                    "thresholdName": "minAvgLengthOfActivityDescription",
89
                    "value": "150"
90
                },
91
                {
92
                    "thresholdName": "searchSubstringsWithProjectSpecification",
93
                    "value": "%dsp%||%specifikace%||%specification%||%vize%proj%||%vize%produ%"
94
                }
95
            ]
96
        },
97
        {
98
            "antiPattern": "RoadToNowhere",
99
            "thresholds": [
100
                {
101
                    "thresholdName": "minNumberOfWikiPagesWithProjectPlan",
102
                    "value": "1"
103
                },
104
                {
105
                    "thresholdName": "minNumberOfActivitiesWithProjectPlan",
106
                    "value": "1"
107
                },
108
                {
109
                    "thresholdName": "searchSubstringsWithProjectPlan",
110
                    "value": "%pl�n projektu%||%project plan%||%plan project%||%projektov� pl�n%"
111
                }
112
            ]
113
        },
114
        {
115
            "antiPattern": "LongOrNonExistentFeedbackLoops",
116
            "thresholds": [
117
                {
118
                    "thresholdName": "divisionOfIterationsWithFeedbackLoop",
119
                    "value": "50.00f"
120
                },
121
                {
122
                    "thresholdName": "maxGapBetweenFeedbackLoopRate",
123
                    "value": "2f"
124
                },
125
                {
126
                    "thresholdName": "searchSubstringsWithFeedbackLoop",
127
                    "value": "%sch�z%z�kazn�k%||%p�edveden�%z�kazn�k%||%z�kazn%demo%||%sch�z%zadavat%||%inform%sch�z%||%z�kazn%||%zadavatel%"
128
                }
129
            ]
130
        },
131
        {
132
            "antiPattern": "NinetyNinetyRule",
133
            "thresholds": [
134
                {
135
                    "thresholdName": "maxDivisionRange",
136
                    "value": "1.25f"
137
                },
138
                {
139
                    "thresholdName": "maxBadDivisionLimit",
140
                    "value": "2"
141
                }
142
            ]
143
        },
144
        {
145
            "antiPattern": "UnknownPoster",
146
            "thresholds": [
147
                {
148
                    "thresholdName": "searchSubstringsInvalidNames",
149
                    "value": "%unknown%||%anonym%"
150
                }
151
            ]
152
        },
153
        {
154
            "antiPattern": "BystanderApathy",
155
            "thresholds": [
156
                {
157
                    "thresholdName": "searchSubstringsInvalidContributors",
158
                    "value": "%dependabot%"
159
                },
160
                {
161
                    "thresholdName": "maximumPercentageOfTasksWithoutTeamwork",
162
                    "value": "30f"
163
                }
164
            ]
165
        },
166
        {
167
            "antiPattern": "YetAnotherProgrammer",
168
            "thresholds": [
169
                {
170
                    "thresholdName": "maxNumberOfNewContributors",
171
                    "value": "5"
172
                },
173
                {
174
                    "thresholdName": "numberOfFirstMonthsWithoutDetection",
175
                    "value": "2"
176
                }
177
            ]
178
        }
179
    ]
180
}',
181
	'Y'
182

  
183

  
184
)
185
insert into user_configurations(userId,configId,configurationName) values (1,1,'default config')
186

  
187
commit
db/spade-views.sql
1
-- phpMyAdmin SQL Dump
2
-- version 5.0.4deb2
3
-- https://www.phpmyadmin.net/
4
--
5
-- Host: localhost
6
-- Generation Time: May 10, 2022 at 05:24 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

  
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 utf8mb4 */;
18

  
19
--
20
-- Database: `spade`
21
--
22
USE `spade`;
23

  
24
-- --------------------------------------------------------
25

  
26
--
27
-- Stand-in structure for view `artifactView`
28
-- (See below for the actual view)
29
--
30
CREATE TABLE `artifactView` (
31
`name` varchar(255)
32
,`description` longtext
33
,`created` datetime
34
,`url` varchar(255)
35
,`id` bigint(20)
36
,`artifactClass` varchar(255)
37
,`mimeType` varchar(255)
38
,`size` bigint(20)
39
,`authorId` bigint(20)
40
,`authorName` varchar(255)
41
,`projectId` bigint(20)
42
);
43

  
44
-- --------------------------------------------------------
45

  
46
--
47
-- Stand-in structure for view `commitedConfigView`
48
-- (See below for the actual view)
49
--
50
CREATE TABLE `commitedConfigView` (
51
`id` bigint(20)
52
,`type` varchar(31)
53
,`name` varchar(255)
54
,`description` longtext
55
,`created` datetime
56
,`authorId` bigint(20)
57
,`authorName` varchar(255)
58
,`relationName` varchar(255)
59
,`relatedId` bigint(20)
60
,`relatedName` varchar(255)
61
,`projectId` bigint(20)
62
,`committed` datetime
63
);
64

  
65
-- --------------------------------------------------------
66

  
67
--
68
-- Stand-in structure for view `commitView`
69
-- (See below for the actual view)
70
--
71
CREATE TABLE `commitView` (
72
`id` bigint(20)
73
,`type` varchar(31)
74
,`name` varchar(255)
75
,`description` longtext
76
,`created` datetime
77
,`authorId` bigint(20)
78
,`authorName` varchar(255)
79
,`relationName` varchar(255)
80
,`relatedId` bigint(20)
81
,`relatedName` varchar(255)
82
,`projectId` bigint(20)
83
,`committed` datetime
84
,`isRelease` bit(1)
85
,`tag` varchar(255)
86
,`branch` varchar(255)
87
,`main` bit(1)
88
);
89

  
90
-- --------------------------------------------------------
91

  
92
--
93
-- Stand-in structure for view `configurationView`
94
-- (See below for the actual view)
95
--
96
CREATE TABLE `configurationView` (
97
`id` bigint(20)
98
,`type` varchar(31)
99
,`name` varchar(255)
100
,`description` longtext
101
,`created` datetime
102
,`authorId` bigint(20)
103
,`authorName` varchar(255)
104
,`relationName` varchar(255)
105
,`relatedId` bigint(20)
106
,`relatedName` varchar(255)
107
,`projectId` bigint(20)
108
);
109

  
110
-- --------------------------------------------------------
111

  
112
--
113
-- Stand-in structure for view `fieldChangeView`
114
-- (See below for the actual view)
115
--
116
CREATE TABLE `fieldChangeView` (
117
`id` bigint(20)
118
,`type` varchar(31)
119
,`name` varchar(255)
120
,`description` longtext
121
,`created` datetime
122
,`authorId` bigint(20)
123
,`authorName` varchar(255)
124
,`relationName` varchar(255)
125
,`relatedId` bigint(20)
126
,`relatedName` varchar(255)
127
,`projectId` bigint(20)
128
,`changeName` varchar(255)
129
,`changeDesc` longtext
130
,`itemId` bigint(20)
131
,`itemType` varchar(31)
132
,`itemName` varchar(255)
133
,`itemDesc` longtext
134
,`itemCreated` datetime
135
,`field` varchar(255)
136
,`newValue` longtext
137
,`oldValue` longtext
138
);
139

  
140
-- --------------------------------------------------------
141

  
142
--
143
-- Stand-in structure for view `personView`
144
-- (See below for the actual view)
145
--
146
CREATE TABLE `personView` (
147
`id` bigint(20)
148
,`name` varchar(255)
149
,`projectId` bigint(20)
150
);
151

  
152
-- --------------------------------------------------------
153

  
154
--
155
-- Stand-in structure for view `personWithRolesView`
156
-- (See below for the actual view)
157
--
158
CREATE TABLE `personWithRolesView` (
159
`id` bigint(20)
160
,`name` varchar(255)
161
,`role` varchar(255)
162
,`roleClass` varchar(255)
163
,`roleSuperClass` varchar(255)
164
,`projectId` bigint(20)
165
);
166

  
167
-- --------------------------------------------------------
168

  
169
--
170
-- Stand-in structure for view `workUnitView`
171
-- (See below for the actual view)
172
--
173
CREATE TABLE `workUnitView` (
174
`id` bigint(20)
175
,`name` varchar(255)
176
,`description` longtext
177
,`created` datetime
178
,`dueDate` date
179
,`estimatedTime` double
180
,`progress` int(11)
181
,`spentTime` double
182
,`startDate` date
183
,`projectId` bigint(20)
184
,`authorId` bigint(20)
185
,`authorName` varchar(255)
186
,`assigneeId` bigint(20)
187
,`assigneeName` varchar(255)
188
,`activityName` varchar(255)
189
,`activityDesc` longtext
190
,`activityEndDate` date
191
,`activityStartDate` date
192
,`iterationName` varchar(255)
193
,`iterationDesc` longtext
194
,`iterationStartDate` date
195
,`iterationEndDate` date
196
,`iterationCreated` datetime
197
,`phaseName` varchar(255)
198
,`phaseDesc` longtext
199
,`phaseStartDate` date
200
,`phaseEndDate` date
201
,`phaseCreated` datetime
202
,`priorityName` varchar(255)
203
,`priorityDesc` longtext
204
,`prioClass` varchar(255)
205
,`prioSuperClass` varchar(255)
206
,`severityName` varchar(255)
207
,`severityDesc` longtext
208
,`severityClass` varchar(255)
209
,`severitySuperClass` varchar(255)
210
,`resolutionName` varchar(255)
211
,`resolutionDescription` longtext
212
,`resolutionClass` varchar(255)
213
,`resolutionSuperClass` varchar(255)
214
,`statusName` varchar(255)
215
,`statusDescription` longtext
216
,`statusClass` varchar(255)
217
,`statusSuperClass` varchar(255)
218
,`wuTypeName` varchar(255)
219
,`wuTypeDescription` longtext
220
,`wuTypeClass` varchar(255)
221
,`categoryName` varchar(255)
222
,`categoryDesc` longtext
223
);
224

  
225
-- --------------------------------------------------------
226

  
227
--
228
-- Structure for view `artifactView`
229
--
230
DROP TABLE IF EXISTS `artifactView`;
231

  
232
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`)) ;
233

  
234
-- --------------------------------------------------------
235

  
236
--
237
-- Structure for view `commitedConfigView`
238
--
239
DROP TABLE IF EXISTS `commitedConfigView`;
240

  
241
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`)) ;
242

  
243
-- --------------------------------------------------------
244

  
245
--
246
-- Structure for view `commitView`
247
--
248
DROP TABLE IF EXISTS `commitView`;
249

  
250
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`)) ;
251

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

  
254
--
255
-- Structure for view `configurationView`
256
--
257
DROP TABLE IF EXISTS `configurationView`;
258

  
259
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`)) ;
260

  
261
-- --------------------------------------------------------
262

  
263
--
264
-- Structure for view `fieldChangeView`
265
--
266
DROP TABLE IF EXISTS `fieldChangeView`;
267

  
268
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`)) ;
269

  
270
-- --------------------------------------------------------
271

  
272
--
273
-- Structure for view `personView`
274
--
275
DROP TABLE IF EXISTS `personView`;
276

  
277
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` ;
278

  
279
-- --------------------------------------------------------
280

  
281
--
282
-- Structure for view `personWithRolesView`
283
--
284
DROP TABLE IF EXISTS `personWithRolesView`;
285

  
286
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`)) ;
287

  
288
-- --------------------------------------------------------
289

  
290
--
291
-- Structure for view `workUnitView`
292
--
293
DROP TABLE IF EXISTS `workUnitView`;
294

  
295
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`)) ;
296
COMMIT;
297

  
298
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
299
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
300
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
db/spade.sql
1
-- phpMyAdmin SQL Dump
2
-- version 5.0.4deb2
3
-- https://www.phpmyadmin.net/
4
--
5
-- Host: localhost
6
-- Generation Time: May 10, 2022 at 05:20 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

  
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 utf8mb4 */;
18

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

  
25
-- --------------------------------------------------------
26

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

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

  
41
-- --------------------------------------------------------
42

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

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

  
54
-- --------------------------------------------------------
55

  
56
--
57
-- Table structure for table `branch`
58
--
59

  
60
CREATE TABLE `branch` (
61
  `id` bigint(20) NOT NULL,
62
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
63
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
64
  `isMain` bit(1) NOT NULL
65
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
66

  
67
-- --------------------------------------------------------
68

  
69
--
70
-- Table structure for table `category`
71
--
72

  
73
CREATE TABLE `category` (
74
  `id` bigint(20) NOT NULL,
75
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
76
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
77
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
78
  `projectInstanceId` bigint(20) DEFAULT NULL
79
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
80

  
81
-- --------------------------------------------------------
82

  
83
--
84
-- Table structure for table `commit`
85
--
86

  
87
CREATE TABLE `commit` (
88
  `identifier` varchar(7) COLLATE utf8_unicode_ci DEFAULT NULL,
89
  `isRelease` bit(1) NOT NULL,
90
  `id` bigint(20) NOT NULL
91
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
92

  
93
-- --------------------------------------------------------
94

  
95
--
96
-- Table structure for table `committed_configuration`
97
--
98

  
99
CREATE TABLE `committed_configuration` (
100
  `committed` datetime DEFAULT NULL,
101
  `id` bigint(20) NOT NULL
102
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
103

  
104
-- --------------------------------------------------------
105

  
106
--
107
-- Table structure for table `competency`
108
--
109

  
110
CREATE TABLE `competency` (
111
  `id` bigint(20) NOT NULL,
112
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
113
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
114
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL
115
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
116

  
117
-- --------------------------------------------------------
118

  
119
--
120
-- Table structure for table `configuration`
121
--
122

  
123
CREATE TABLE `configuration` (
124
  `id` bigint(20) NOT NULL,
125
  `projectId` bigint(20) DEFAULT NULL
126
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
127

  
128
-- --------------------------------------------------------
129

  
130
--
131
-- Table structure for table `configuration_branch`
132
--
133

  
134
CREATE TABLE `configuration_branch` (
135
  `configurationId` bigint(20) NOT NULL,
136
  `branchId` bigint(20) NOT NULL
137
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
138

  
139
-- --------------------------------------------------------
140

  
141
--
142
-- Table structure for table `configuration_change`
143
--
144

  
145
CREATE TABLE `configuration_change` (
146
  `configurationId` bigint(20) NOT NULL,
147
  `changeId` bigint(20) NOT NULL
148
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
149

  
150
-- --------------------------------------------------------
151

  
152
--
153
-- Table structure for table `configuration_person_relation`
154
--
155

  
156
CREATE TABLE `configuration_person_relation` (
157
  `id` bigint(20) NOT NULL,
158
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
159
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
160
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
161
  `personId` bigint(20) DEFAULT NULL,
162
  `configurationId` bigint(20) DEFAULT NULL
163
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
164

  
165
-- --------------------------------------------------------
166

  
167
--
168
-- Table structure for table `criterion`
169
--
170

  
171
CREATE TABLE `criterion` (
172
  `id` bigint(20) NOT NULL,
173
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
174
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
175
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL
176
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
177

  
178
-- --------------------------------------------------------
179

  
180
--
181
-- Table structure for table `field_change`
182
--
183

  
184
CREATE TABLE `field_change` (
185
  `id` bigint(20) NOT NULL,
186
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
187
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
188
  `newValue` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
189
  `oldValue` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
190
  `workItemChangeId` bigint(20) DEFAULT NULL
191
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
192

  
193
-- --------------------------------------------------------
194

  
195
--
196
-- Table structure for table `group_member`
197
--
198

  
199
CREATE TABLE `group_member` (
200
  `groupId` bigint(20) NOT NULL,
201
  `memberId` bigint(20) NOT NULL
202
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
203

  
204
-- --------------------------------------------------------
205

  
206
--
207
-- Table structure for table `identity`
208
--
209

  
210
CREATE TABLE `identity` (
211
  `id` bigint(20) NOT NULL,
212
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
213
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
214
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
215
  `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
216
  `personId` bigint(20) DEFAULT NULL
217
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
218

  
219
-- --------------------------------------------------------
220

  
221
--
222
-- Table structure for table `iteration`
223
--
224

  
225
CREATE TABLE `iteration` (
226
  `id` bigint(20) NOT NULL,
227
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
228
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
229
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
230
  `endDate` date DEFAULT NULL,
231
  `startDate` date DEFAULT NULL,
232
  `created` datetime DEFAULT NULL,
233
  `superProjectId` bigint(20) DEFAULT NULL,
234
  `configurationId` bigint(20) DEFAULT NULL
235
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
236

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

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

  
243
CREATE TABLE `milestone` (
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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
249

  
250
-- --------------------------------------------------------
251

  
252
--
253
-- Table structure for table `milestone_criterion`
254
--
255

  
256
CREATE TABLE `milestone_criterion` (
257
  `milestoneId` bigint(20) NOT NULL,
258
  `criterionId` bigint(20) NOT NULL
259
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
260

  
261
-- --------------------------------------------------------
262

  
263
--
264
-- Table structure for table `people_group`
265
--
266

  
267
CREATE TABLE `people_group` (
268
  `id` bigint(20) NOT NULL,
269
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
270
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
271
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
272
  `projectInstanceId` bigint(20) DEFAULT NULL
273
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
274

  
275
-- --------------------------------------------------------
276

  
277
--
278
-- Table structure for table `person`
279
--
280

  
281
CREATE TABLE `person` (
282
  `id` bigint(20) NOT NULL,
283
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
284
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
285
  `projectId` bigint(20) DEFAULT NULL
286
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
287

  
288
-- --------------------------------------------------------
289

  
290
--
291
-- Table structure for table `person_competency`
292
--
293

  
294
CREATE TABLE `person_competency` (
295
  `personId` bigint(20) NOT NULL,
296
  `competencyId` bigint(20) NOT NULL
297
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
298

  
299
-- --------------------------------------------------------
300

  
301
--
302
-- Table structure for table `person_role`
303
--
304

  
305
CREATE TABLE `person_role` (
306
  `personId` bigint(20) NOT NULL,
307
  `roleId` bigint(20) NOT NULL
308
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
309

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

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

  
316
CREATE TABLE `phase` (
317
  `id` bigint(20) NOT NULL,
318
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
319
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
320
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
321
  `endDate` date DEFAULT NULL,
322
  `startDate` date DEFAULT NULL,
323
  `created` datetime DEFAULT NULL,
324
  `superProjectId` bigint(20) DEFAULT NULL,
325
  `configurationId` bigint(20) DEFAULT NULL,
326
  `milestoneId` bigint(20) DEFAULT NULL
327
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
328

  
329
-- --------------------------------------------------------
330

  
331
--
332
-- Table structure for table `priority`
333
--
334

  
335
CREATE TABLE `priority` (
336
  `id` bigint(20) NOT NULL,
337
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
338
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
339
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
340
  `classId` bigint(20) DEFAULT NULL,
341
  `projectInstanceId` bigint(20) DEFAULT NULL
342
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
343

  
344
-- --------------------------------------------------------
345

  
346
--
347
-- Table structure for table `priority_classification`
348
--
349

  
350
CREATE TABLE `priority_classification` (
351
  `id` bigint(20) NOT NULL,
352
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
353
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
354
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
355

  
356
--
357
-- Dumping data for table `priority_classification`
358
--
359

  
360
INSERT INTO `priority_classification` (`id`, `class`, `superClass`) VALUES
361
(1, 'UNASSIGNED', 'UNASSIGNED'),
362
(2, 'LOWEST', 'LOW'),
363
(3, 'LOW', 'LOW'),
364
(4, 'NORMAL', 'NORMAL'),
365
(5, 'HIGH', 'HIGH'),
366
(6, 'HIGHEST', 'HIGH');
367

  
368
-- --------------------------------------------------------
369

  
370
--
371
-- Table structure for table `program`
372
--
373

  
374
CREATE TABLE `program` (
375
  `programClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
376
  `id` bigint(20) NOT NULL
377
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
378

  
379
-- --------------------------------------------------------
380

  
381
--
382
-- Table structure for table `project`
383
--
384

  
385
CREATE TABLE `project` (
386
  `id` bigint(20) NOT NULL,
387
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
388
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
389
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
390
  `endDate` date DEFAULT NULL,
391
  `startDate` date DEFAULT NULL,
392
  `superProjectId` bigint(20) DEFAULT NULL
393
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
394

  
395
-- --------------------------------------------------------
396

  
397
--
398
-- Table structure for table `project_instance`
399
--
400

  
401
CREATE TABLE `project_instance` (
402
  `id` bigint(20) NOT NULL,
403
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
404
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
405
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
406
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
407
  `projectId` bigint(20) DEFAULT NULL,
408
  `toolInstanceId` bigint(20) DEFAULT NULL
409
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
410

  
411
-- --------------------------------------------------------
412

  
413
--
414
-- Table structure for table `relation`
415
--
416

  
417
CREATE TABLE `relation` (
418
  `id` bigint(20) NOT NULL,
419
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
420
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
421
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
422
  `classId` bigint(20) DEFAULT NULL,
423
  `projectInstanceId` bigint(20) DEFAULT NULL
424
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
425

  
426
-- --------------------------------------------------------
427

  
428
--
429
-- Table structure for table `relation_classification`
430
--
431

  
432
CREATE TABLE `relation_classification` (
433
  `id` bigint(20) NOT NULL,
434
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
435
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
436
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
437

  
438
--
439
-- Dumping data for table `relation_classification`
440
--
441

  
442
INSERT INTO `relation_classification` (`id`, `class`, `superClass`) VALUES
443
(1, 'UNASSIGNED', 'UNASSIGNED'),
444
(2, 'DUPLICATES', 'SIMILARITY'),
445
(3, 'DUPLICATEDBY', 'SIMILARITY'),
446
(4, 'BLOCKS', 'TEMPORAL'),
447
(5, 'BLOCKEDBY', 'TEMPORAL'),
448
(6, 'RELATESTO', 'GENERAL'),
449
(7, 'PRECEDES', 'TEMPORAL'),
450
(8, 'FOLLOWS', 'TEMPORAL'),
451
(9, 'COPIEDFROM', 'SIMILARITY'),
452
(10, 'COPIEDBY', 'SIMILARITY'),
453
(11, 'CHILDOF', 'HIERARCHICAL'),
454
(12, 'PARENTOF', 'HIERARCHICAL'),
455
(13, 'CAUSES', 'CAUSAL'),
456
(14, 'CAUSEDBY', 'CAUSAL'),
457
(15, 'RESOLVES', 'CAUSAL'),
458
(16, 'RESOLVEDBY', 'CAUSAL');
459

  
460
-- --------------------------------------------------------
461

  
462
--
463
-- Table structure for table `resolution`
464
--
465

  
466
CREATE TABLE `resolution` (
467
  `id` bigint(20) NOT NULL,
468
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
469
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
470
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
471
  `classId` bigint(20) DEFAULT NULL,
472
  `projectInstanceId` bigint(20) DEFAULT NULL
473
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
474

  
475
-- --------------------------------------------------------
476

  
477
--
478
-- Table structure for table `resolution_classification`
479
--
480

  
481
CREATE TABLE `resolution_classification` (
482
  `id` bigint(20) NOT NULL,
483
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
484
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
485
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
486

  
487
--
488
-- Dumping data for table `resolution_classification`
489
--
490

  
491
INSERT INTO `resolution_classification` (`id`, `class`, `superClass`) VALUES
492
(1, 'UNASSIGNED', 'UNASSIGNED'),
493
(2, 'DUPLICATE', 'FINISHED'),
494
(3, 'INVALID', 'FINISHED'),
495
(4, 'WONTFIX', 'FINISHED'),
496
(5, 'WORKSASDESIGNED', 'FINISHED'),
497
(6, 'FIXED', 'FINISHED'),
498
(7, 'FINISHED', 'FINISHED'),
499
(8, 'INCOMPLETE', 'UNFINISHED'),
500
(9, 'WORKSFORME', 'UNFINISHED'),
501
(10, 'UNFINISHED', 'UNFINISHED');
502

  
503
-- --------------------------------------------------------
504

  
505
--
506
-- Table structure for table `role`
507
--
508

  
509
CREATE TABLE `role` (
510
  `id` bigint(20) NOT NULL,
511
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
512
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
513
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
514
  `classId` bigint(20) DEFAULT NULL,
515
  `projectInstanceId` bigint(20) DEFAULT NULL
516
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
517

  
518
-- --------------------------------------------------------
519

  
520
--
521
-- Table structure for table `role_classification`
522
--
523

  
524
CREATE TABLE `role_classification` (
525
  `id` bigint(20) NOT NULL,
526
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
527
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
528
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
529

  
530
--
531
-- Dumping data for table `role_classification`
532
--
533

  
534
INSERT INTO `role_classification` (`id`, `class`, `superClass`) VALUES
535
(1, 'UNASSIGNED', 'UNASSIGNED'),
536
(2, 'NONMEMBER', 'NONMEMBER'),
537
(3, 'MENTOR', 'STAKEHOLDER'),
538
(4, 'STAKEHOLDER', 'STAKEHOLDER'),
539
(5, 'PROJECTMANAGER', 'MANAGEMENT'),
540
(6, 'TEAMMEMBER', 'TEAMMEMBER'),
541
(7, 'ANALYST', 'TEAMMEMBER'),
542
(8, 'DESIGNER', 'TEAMMEMBER'),
543
(9, 'DEVELOPER', 'TEAMMEMBER'),
544
(10, 'TESTER', 'TEAMMEMBER'),
545
(11, 'DOCUMENTER', 'TEAMMEMBER');
546

  
547
-- --------------------------------------------------------
548

  
549
--
550
-- Table structure for table `severity`
551
--
552

  
553
CREATE TABLE `severity` (
554
  `id` bigint(20) NOT NULL,
555
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
556
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
557
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
558
  `classId` bigint(20) DEFAULT NULL,
559
  `projectInstanceId` bigint(20) DEFAULT NULL
560
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
561

  
562
-- --------------------------------------------------------
563

  
564
--
565
-- Table structure for table `severity_classification`
566
--
567

  
568
CREATE TABLE `severity_classification` (
569
  `id` bigint(20) NOT NULL,
570
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
571
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
572
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
573

  
574
--
575
-- Dumping data for table `severity_classification`
576
--
577

  
578
INSERT INTO `severity_classification` (`id`, `class`, `superClass`) VALUES
579
(1, 'UNASSIGNED', 'UNASSIGNED'),
580
(2, 'TRIVIAL', 'MINOR'),
581
(3, 'MINOR', 'MINOR'),
582
(4, 'NORMAL', 'NORMAL'),
583
(5, 'MAJOR', 'MAJOR'),
584
(6, 'CRITICAL', 'MAJOR');
585

  
586
-- --------------------------------------------------------
587

  
588
--
589
-- Table structure for table `status`
590
--
591

  
592
CREATE TABLE `status` (
593
  `id` bigint(20) NOT NULL,
594
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
595
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
596
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
597
  `classId` bigint(20) DEFAULT NULL,
598
  `projectInstanceId` bigint(20) DEFAULT NULL
599
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
600

  
601
-- --------------------------------------------------------
602

  
603
--
604
-- Table structure for table `status_classification`
605
--
606

  
607
CREATE TABLE `status_classification` (
608
  `id` bigint(20) NOT NULL,
609
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
610
  `superClass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
611
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
612

  
613
--
614
-- Dumping data for table `status_classification`
615
--
616

  
617
INSERT INTO `status_classification` (`id`, `class`, `superClass`) VALUES
618
(1, 'UNASSIGNED', 'UNASSIGNED'),
619
(2, 'NEW', 'OPEN'),
620
(3, 'OPEN', 'OPEN'),
621
(4, 'ACCEPTED', 'OPEN'),
622
(5, 'INPROGRESS', 'OPEN'),
623
(6, 'RESOLVED', 'OPEN'),
624
(7, 'VERIFIED', 'OPEN'),
625
(8, 'DONE', 'CLOSED'),
626
(9, 'CLOSED', 'CLOSED'),
627
(10, 'INVALID', 'CLOSED'),
628
(11, 'DELETED', 'CLOSED');
629

  
630
-- --------------------------------------------------------
631

  
632
--
633
-- Table structure for table `tag`
634
--
635

  
636
CREATE TABLE `tag` (
637
  `id` bigint(20) NOT NULL,
638
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
639
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
640
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
641
  `configurationId` bigint(20) DEFAULT NULL
642
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
643

  
644
-- --------------------------------------------------------
645

  
646
--
647
-- Table structure for table `tool_instance`
648
--
649

  
650
CREATE TABLE `tool_instance` (
651
  `id` bigint(20) NOT NULL,
652
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
653
  `tool` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
654
  `version` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
655
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
656

  
657
-- --------------------------------------------------------
658

  
659
--
660
-- Table structure for table `work_item`
661
--
662

  
663
CREATE TABLE `work_item` (
664
  `workItemType` varchar(31) COLLATE utf8_unicode_ci NOT NULL,
665
  `id` bigint(20) NOT NULL,
666
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
667
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
668
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
669
  `created` datetime DEFAULT NULL,
670
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
671
  `authorId` bigint(20) DEFAULT NULL
672
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
673

  
674
-- --------------------------------------------------------
675

  
676
--
677
-- Table structure for table `work_item_change`
678
--
679

  
680
CREATE TABLE `work_item_change` (
681
  `id` bigint(20) NOT NULL,
682
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
683
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
684
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
685
  `workItemId` bigint(20) DEFAULT NULL
686
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
687

  
688
-- --------------------------------------------------------
689

  
690
--
691
-- Table structure for table `work_item_relation`
692
--
693

  
694
CREATE TABLE `work_item_relation` (
695
  `id` bigint(20) NOT NULL,
696
  `rightItemId` bigint(20) DEFAULT NULL,
697
  `relationId` bigint(20) DEFAULT NULL,
698
  `leftItemId` bigint(20) DEFAULT NULL
699
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
700

  
701
-- --------------------------------------------------------
702

  
703
--
704
-- Table structure for table `work_unit`
705
--
706

  
707
CREATE TABLE `work_unit` (
708
  `dueDate` date DEFAULT NULL,
709
  `estimatedTime` double NOT NULL,
710
  `number` int(11) NOT NULL,
711
  `progress` int(11) NOT NULL,
712
  `spentTime` double NOT NULL,
713
  `startDate` date DEFAULT NULL,
714
  `id` bigint(20) NOT NULL,
715
  `activityId` bigint(20) DEFAULT NULL,
716
  `assigneeId` bigint(20) DEFAULT NULL,
717
  `iterationId` bigint(20) DEFAULT NULL,
718
  `phaseId` bigint(20) DEFAULT NULL,
719
  `priorityId` bigint(20) DEFAULT NULL,
720
  `resolutionId` bigint(20) DEFAULT NULL,
721
  `severityId` bigint(20) DEFAULT NULL,
722
  `statusId` bigint(20) DEFAULT NULL,
723
  `wuTypeId` bigint(20) DEFAULT NULL,
724
  `projectId` bigint(20) DEFAULT NULL
725
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
726

  
727
-- --------------------------------------------------------
728

  
729
--
730
-- Table structure for table `work_unit_category`
731
--
732

  
733
CREATE TABLE `work_unit_category` (
734
  `workUnitId` bigint(20) NOT NULL,
735
  `categoryId` bigint(20) NOT NULL
736
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
737

  
738
-- --------------------------------------------------------
739

  
740
--
741
-- Table structure for table `wu_type`
742
--
743

  
744
CREATE TABLE `wu_type` (
745
  `id` bigint(20) NOT NULL,
746
  `externalId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
747
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
748
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
749
  `classId` bigint(20) DEFAULT NULL,
750
  `projectInstanceId` bigint(20) DEFAULT NULL
751
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
752

  
753
-- --------------------------------------------------------
754

  
755
--
756
-- Table structure for table `wu_type_classification`
757
--
758

  
759
CREATE TABLE `wu_type_classification` (
760
  `id` bigint(20) NOT NULL,
761
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
762
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
763

  
764
--
765
-- Dumping data for table `wu_type_classification`
766
--
767

  
768
INSERT INTO `wu_type_classification` (`id`, `class`) VALUES
769
(1, 'UNASSIGNED'),
770
(2, 'BUG'),
771
(3, 'ENHANCEMENT'),
772
(4, 'FEATURE'),
773
(5, 'TASK');
774

  
775
--
776
-- Indexes for dumped tables
777
--
778

  
779
--
780
-- Indexes for table `activity`
781
--
782
ALTER TABLE `activity`
783
  ADD PRIMARY KEY (`id`),
784
  ADD KEY `FK_blqrry9wsm0foxy0mg00a0epk` (`superProjectId`);
785

  
786
--
787
-- Indexes for table `artifact`
788
--
789
ALTER TABLE `artifact`
790
  ADD PRIMARY KEY (`id`);
791

  
792
--
793
-- Indexes for table `branch`
794
--
795
ALTER TABLE `branch`
796
  ADD PRIMARY KEY (`id`);
797

  
798
--
799
-- Indexes for table `category`
800
--
801
ALTER TABLE `category`
802
  ADD PRIMARY KEY (`id`),
803
  ADD KEY `FK_cpikjj79a9qmnxmo5unps4hsw` (`projectInstanceId`);
804

  
805
--
806
-- Indexes for table `commit`
807
--
808
ALTER TABLE `commit`
809
  ADD PRIMARY KEY (`id`);
810

  
811
--
812
-- Indexes for table `committed_configuration`
813
--
814
ALTER TABLE `committed_configuration`
815
  ADD PRIMARY KEY (`id`);
816

  
817
--
818
-- Indexes for table `competency`
819
--
820
ALTER TABLE `competency`
821
  ADD PRIMARY KEY (`id`);
822

  
823
--
824
-- Indexes for table `configuration`
825
--
826
ALTER TABLE `configuration`
827
  ADD PRIMARY KEY (`id`),
828
  ADD KEY `FK_o7bmirglj65sjrcym8a1ywgwc` (`projectId`);
829

  
830
--
831
-- Indexes for table `configuration_branch`
832
--
833
ALTER TABLE `configuration_branch`
834
  ADD KEY `FK_kq1ppnqu72in7ciaiv0qfm7gq` (`branchId`),
835
  ADD KEY `FK_bvbx76vbqrs4wkix8a4l64mgk` (`configurationId`);
836

  
837
--
838
-- Indexes for table `configuration_change`
839
--
840
ALTER TABLE `configuration_change`
841
  ADD UNIQUE KEY `UK_2vr3gl6l9t320r67yfspg8e16` (`changeId`),
842
  ADD KEY `FK_b11yrb5xl6ea5lceca8r6eyaq` (`configurationId`);
843

  
844
--
845
-- Indexes for table `configuration_person_relation`
846
--
847
ALTER TABLE `configuration_person_relation`
848
  ADD PRIMARY KEY (`id`),
849
  ADD KEY `FK_bannhsxpvu262ewrp6aval67i` (`personId`),
850
  ADD KEY `FK_miwxanxtv7gt3knvsflwncix7` (`configurationId`);
851

  
852
--
853
-- Indexes for table `criterion`
854
--
855
ALTER TABLE `criterion`
856
  ADD PRIMARY KEY (`id`);
857

  
858
--
859
-- Indexes for table `field_change`
860
--
861
ALTER TABLE `field_change`
862
  ADD PRIMARY KEY (`id`),
863
  ADD KEY `FK_mpcn64kubumdcj69467wdexg6` (`workItemChangeId`);
864

  
865
--
866
-- Indexes for table `group_member`
867
--
868
ALTER TABLE `group_member`
869
  ADD KEY `FK_67y4ufvw9p8w6mt4cp7bwa972` (`memberId`),
870
  ADD KEY `FK_g639kt1nekbaykgg0pwy8ips8` (`groupId`);
871

  
872
--
873
-- Indexes for table `identity`
874
--
875
ALTER TABLE `identity`
876
  ADD PRIMARY KEY (`id`),
877
  ADD KEY `FK_ocuj7jp17fw0qcow4o3f8e8o0` (`personId`);
878

  
879
--
880
-- Indexes for table `iteration`
881
--
882
ALTER TABLE `iteration`
883
  ADD PRIMARY KEY (`id`),
884
  ADD KEY `FK_55okl4mwia1vo7n8q6dsbfr55` (`superProjectId`),
885
  ADD KEY `FK_bid9cxxcrg3oufp2wc33j1h1e` (`configurationId`);
886

  
887
--
888
-- Indexes for table `milestone`
889
--
890
ALTER TABLE `milestone`
891
  ADD PRIMARY KEY (`id`);
892

  
893
--
894
-- Indexes for table `milestone_criterion`
895
--
896
ALTER TABLE `milestone_criterion`
897
  ADD KEY `FK_j65caq74d17bhsly89kylc3jk` (`criterionId`),
898
  ADD KEY `FK_hahtmhvat46jgvqn41s98dxdl` (`milestoneId`);
899

  
900
--
901
-- Indexes for table `people_group`
902
--
903
ALTER TABLE `people_group`
904
  ADD PRIMARY KEY (`id`),
905
  ADD KEY `FK_pif918vt32wbakh9vwaye6ib4` (`projectInstanceId`);
906

  
907
--
... Rozdílový soubor je zkrácen, protože jeho délka přesahuje max. limit.

Také k dispozici: Unified diff