Revize cbfa8568
Přidáno uživatelem stepanekp před asi 1 rok
db/spawn/create_app_metadata.sql | ||
---|---|---|
1 |
CREATE TABLE app_metadata ( |
|
2 |
id INT AUTO_INCREMENT PRIMARY KEY, |
|
3 |
appDataKey VARCHAR(255), |
|
4 |
appDataValue TEXT |
|
5 |
); |
|
6 |
|
|
7 |
INSERT INTO app_metadata (appDataKey, appDataValue) VALUES |
|
8 |
('basics', '[{ |
|
9 |
"version": "1.0.0", |
|
10 |
"authors": [{ |
|
11 |
"name": "Ondřej Váně", |
|
12 |
"email": "vaneo@students.zcu.cz" |
|
13 |
}], |
|
14 |
"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." |
|
15 |
}, { |
|
16 |
"version": "1.1.0", |
|
17 |
"authors": [{ |
|
18 |
"name": "Ondřej Váně", |
|
19 |
"email": "vaneo@students.zcu.cz" |
|
20 |
}], |
|
21 |
"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." |
|
22 |
}, { |
|
23 |
"version": "1.2.0", |
|
24 |
"authors": [{ |
|
25 |
"name": "Petr Štěpánek", |
|
26 |
"email": "petrs1@students.zcu.cz" |
|
27 |
}], |
|
28 |
"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." |
|
29 |
}, { |
|
30 |
"version": "2.0.0", |
|
31 |
"authors": [{ |
|
32 |
"name": "Petr Štěpánek", |
|
33 |
"email": "petrs1@students.zcu.cz" |
|
34 |
}, { |
|
35 |
"name": "Petr Urban", |
|
36 |
"email": "urbanp@students.zcu.cz" |
|
37 |
}, { |
|
38 |
"name": "Jiří Trefil", |
|
39 |
"email": "trefil@students.zcu.cz" |
|
40 |
}, { |
|
41 |
"name": "Václav Hrabík", |
|
42 |
"email": "hrabikv@students.zcu.cz" |
|
43 |
}], |
|
44 |
"description": "Experience the next evolution of our application with version 2.0.0, featuring a revamped infrastructure, three distinct apps, MS SQL Server integration, a comprehensive user provider system, and contract testing for enhanced reliability." |
|
45 |
}]'); |
db/spawn/create_configurations.sql | ||
---|---|---|
1 |
USE authspade; |
|
2 |
|
|
3 |
CREATE TABLE IF NOT EXISTS configurations ( |
|
4 |
id INT AUTO_INCREMENT PRIMARY KEY, |
|
5 |
configHash VARCHAR(255), |
|
6 |
config TEXT NOT NULL, |
|
7 |
isDefault CHAR(1) NOT NULL, |
|
8 |
defaultConfigName VARCHAR(255) |
|
9 |
); |
|
10 |
|
|
11 |
CREATE TABLE IF NOT EXISTS user_configurations ( |
|
12 |
userId INT NOT NULL, |
|
13 |
configId INT NOT NULL, |
|
14 |
configurationName VARCHAR(255) NOT NULL, |
|
15 |
FOREIGN KEY (userId) REFERENCES users(id), |
|
16 |
FOREIGN KEY (configId) REFERENCES configurations(id), |
|
17 |
PRIMARY KEY (userId, configId) |
|
18 |
); |
|
19 |
|
|
20 |
INSERT INTO configurations (config, isDefault, defaultConfigName) VALUES ( |
|
21 |
'{ |
|
22 |
"configuration": [ |
|
23 |
{ |
|
24 |
"antiPattern": "TooLongSprint", |
|
25 |
"thresholds": [ |
|
26 |
{ |
|
27 |
"thresholdName": "maxIterationLength", |
|
28 |
"value": "21" |
|
29 |
}, |
|
30 |
{ |
|
31 |
"thresholdName": "maxNumberOfTooLongIterations", |
|
32 |
"value": "0" |
|
33 |
} |
|
34 |
] |
|
35 |
}, |
|
36 |
{ |
|
37 |
"antiPattern": "VaryingSprintLength", |
|
38 |
"thresholds": [ |
|
39 |
{ |
|
40 |
"thresholdName": "maxDaysDifference", |
|
41 |
"value": "7" |
|
42 |
}, |
|
43 |
{ |
|
44 |
"thresholdName": "maxIterationChanged", |
|
45 |
"value": "1" |
|
46 |
} |
|
47 |
] |
|
48 |
}, |
|
49 |
{ |
|
50 |
"antiPattern": "BusinessAsUsual", |
|
51 |
"thresholds": [ |
|
52 |
{ |
|
53 |
"thresholdName": "divisionOfIterationsWithRetrospective", |
|
54 |
"value": "66.66f" |
|
55 |
}, |
|
56 |
{ |
|
57 |
"thresholdName": "searchSubstringsWithRetrospective", |
|
58 |
"value": "%retr%||%revi%||%week%scrum%" |
|
59 |
} |
|
60 |
] |
|
61 |
}, |
|
62 |
{ |
|
63 |
"antiPattern": "SpecifyNothing", |
|
64 |
"thresholds": [ |
|
65 |
{ |
|
66 |
"thresholdName": "minNumberOfWikiPagesWithSpecification", |
|
67 |
"value": "1" |
|
68 |
}, |
|
69 |
{ |
|
70 |
"thresholdName": "minNumberOfActivitiesWithSpecification", |
|
71 |
"value": "1" |
|
72 |
}, |
|
73 |
{ |
|
74 |
"thresholdName": "minAvgLengthOfActivityDescription", |
|
75 |
"value": "150" |
|
76 |
}, |
|
77 |
{ |
|
78 |
"thresholdName": "searchSubstringsWithProjectSpecification", |
|
79 |
"value": "%dsp%||%specifikace%||%specification%||%vize%proj%||%vize%produ%" |
|
80 |
} |
|
81 |
] |
|
82 |
}, |
|
83 |
{ |
|
84 |
"antiPattern": "RoadToNowhere", |
|
85 |
"thresholds": [ |
|
86 |
{ |
|
87 |
"thresholdName": "minNumberOfWikiPagesWithProjectPlan", |
|
88 |
"value": "1" |
|
89 |
}, |
|
90 |
{ |
|
91 |
"thresholdName": "minNumberOfActivitiesWithProjectPlan", |
|
92 |
"value": "1" |
|
93 |
}, |
|
94 |
{ |
|
95 |
"thresholdName": "searchSubstringsWithProjectPlan", |
|
96 |
"value": "%pl n projektu%||%project plan%||%plan project%||%projektov pl n%" |
|
97 |
} |
|
98 |
] |
|
99 |
}, |
|
100 |
{ |
|
101 |
"antiPattern": "LongOrNonExistentFeedbackLoops", |
|
102 |
"thresholds": [ |
|
103 |
{ |
|
104 |
"thresholdName": "divisionOfIterationsWithFeedbackLoop", |
|
105 |
"value": "50.00f" |
|
106 |
}, |
|
107 |
{ |
|
108 |
"thresholdName": "maxGapBetweenFeedbackLoopRate", |
|
109 |
"value": "2f" |
|
110 |
}, |
|
111 |
{ |
|
112 |
"thresholdName": "searchSubstringsWithFeedbackLoop", |
|
113 |
"value": "%sch z%z kazn k%||%p edveden %z kazn k%||%z kazn%demo%||%sch z%zadavat%||%inform%sch z%||%z kazn%||%zadavatel%" |
|
114 |
} |
|
115 |
] |
|
116 |
}, |
|
117 |
{ |
|
118 |
"antiPattern": "NinetyNinetyRule", |
|
119 |
"thresholds": [ |
|
120 |
{ |
|
121 |
"thresholdName": "maxDivisionRange", |
|
122 |
"value": "1.25f" |
|
123 |
}, |
|
124 |
{ |
|
125 |
"thresholdName": "maxBadDivisionLimit", |
|
126 |
"value": "2" |
|
127 |
} |
|
128 |
] |
|
129 |
}, |
|
130 |
{ |
|
131 |
"antiPattern": "UnknownPoster", |
|
132 |
"thresholds": [ |
|
133 |
{ |
|
134 |
"thresholdName": "searchSubstringsInvalidNames", |
|
135 |
"value": "%unknown%||%anonym%" |
|
136 |
} |
|
137 |
] |
|
138 |
}, |
|
139 |
{ |
|
140 |
"antiPattern": "BystanderApathy", |
|
141 |
"thresholds": [ |
|
142 |
{ |
|
143 |
"thresholdName": "searchSubstringsInvalidContributors", |
|
144 |
"value": "%dependabot%" |
|
145 |
}, |
|
146 |
{ |
|
147 |
"thresholdName": "maximumPercentageOfTasksWithoutTeamwork", |
|
148 |
"value": "30f" |
|
149 |
} |
|
150 |
] |
|
151 |
}, |
|
152 |
{ |
|
153 |
"antiPattern": "YetAnotherProgrammer", |
|
154 |
"thresholds": [ |
|
155 |
{ |
|
156 |
"thresholdName": "maxNumberOfNewContributors", |
|
157 |
"value": "5" |
|
158 |
}, |
|
159 |
{ |
|
160 |
"thresholdName": "numberOfFirstMonthsWithoutDetection", |
|
161 |
"value": "2" |
|
162 |
} |
|
163 |
] |
|
164 |
} |
|
165 |
] |
|
166 |
}', |
|
167 |
'Y', 'default configuration' |
|
168 |
); |
db/spawn/create_users.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS users ( |
|
2 |
id INT AUTO_INCREMENT PRIMARY KEY, |
|
3 |
email VARCHAR(255) NULL, |
|
4 |
name VARCHAR(255) NOT NULL, |
|
5 |
password VARCHAR(255) NULL |
|
6 |
); |
db/spawn/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": "Experience the next evolution of our application with version 2.0.0, featuring a revamped infrastructure, three distinct apps, MS SQL Server integration, a comprehensive user provider system, and contract testing for enhanced reliability." |
|
65 |
} |
|
66 |
]') |
|
67 |
|
db/spawn/db.spawn_createUsersTable.sql | ||
---|---|---|
1 |
if not exists (select * from sysobjects where name='users' and xtype='U') |
|
2 |
create table users( |
|
3 |
id int identity(1,1), |
|
4 |
email nvarchar(255) null, |
|
5 |
name nvarchar(255) not null, |
|
6 |
password varchar(255) null, |
|
7 |
PRIMARY KEY(id) |
|
8 |
); |
db/spawn/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 |
defaultConfigName nvarchar(255), |
|
10 |
PRIMARY KEY(id) |
|
11 |
); |
|
12 |
|
|
13 |
--rozkladova tabulka mapujici uzivatele a k nemu asociovane konfigurace |
|
14 |
if not exists (select * from sysobjects where name='user_configurations' and xtype='U') |
|
15 |
create table user_configurations ( |
|
16 |
userId int not null, |
|
17 |
configId int not null, |
|
18 |
configurationName nvarchar(255) not null, |
|
19 |
foreign key(userId) references users(id), |
|
20 |
foreign key(configId) references configurations(id), |
|
21 |
primary key(userId,configId) |
|
22 |
) |
|
23 |
|
|
24 |
insert into configurations (config, isDefault, defaultConfigName) values ( |
|
25 |
'{ |
|
26 |
"configuration": [ |
|
27 |
{ |
|
28 |
"antiPattern": "TooLongSprint", |
|
29 |
"thresholds": [ |
|
30 |
{ |
|
31 |
"thresholdName": "maxIterationLength", |
|
32 |
"value": "21" |
|
33 |
}, |
|
34 |
{ |
|
35 |
"thresholdName": "maxNumberOfTooLongIterations", |
|
36 |
"value": "0" |
|
37 |
} |
|
38 |
] |
|
39 |
}, |
|
40 |
{ |
|
41 |
"antiPattern": "VaryingSprintLength", |
|
42 |
"thresholds": [ |
|
43 |
{ |
|
44 |
"thresholdName": "maxDaysDifference", |
|
45 |
"value": "7" |
|
46 |
}, |
|
47 |
{ |
|
48 |
"thresholdName": "maxIterationChanged", |
|
49 |
"value": "1" |
|
50 |
} |
|
51 |
] |
|
52 |
}, |
|
53 |
{ |
|
54 |
"antiPattern": "BusinessAsUsual", |
|
55 |
"thresholds": [ |
|
56 |
{ |
|
57 |
"thresholdName": "divisionOfIterationsWithRetrospective", |
|
58 |
"value": "66.66f" |
|
59 |
}, |
|
60 |
{ |
|
61 |
"thresholdName": "searchSubstringsWithRetrospective", |
|
62 |
"value": "%retr%||%revi%||%week%scrum%" |
|
63 |
} |
|
64 |
] |
|
65 |
}, |
|
66 |
{ |
|
67 |
"antiPattern": "SpecifyNothing", |
|
68 |
"thresholds": [ |
|
69 |
{ |
|
70 |
"thresholdName": "minNumberOfWikiPagesWithSpecification", |
|
71 |
"value": "1" |
|
72 |
}, |
|
73 |
{ |
|
74 |
"thresholdName": "minNumberOfActivitiesWithSpecification", |
|
75 |
"value": "1" |
|
76 |
}, |
|
77 |
{ |
|
78 |
"thresholdName": "minAvgLengthOfActivityDescription", |
|
79 |
"value": "150" |
|
80 |
}, |
|
81 |
{ |
|
82 |
"thresholdName": "searchSubstringsWithProjectSpecification", |
|
83 |
"value": "%dsp%||%specifikace%||%specification%||%vize%proj%||%vize%produ%" |
|
84 |
} |
|
85 |
] |
|
86 |
}, |
|
87 |
{ |
|
88 |
"antiPattern": "RoadToNowhere", |
|
89 |
"thresholds": [ |
|
90 |
{ |
|
91 |
"thresholdName": "minNumberOfWikiPagesWithProjectPlan", |
|
92 |
"value": "1" |
|
93 |
}, |
|
94 |
{ |
|
95 |
"thresholdName": "minNumberOfActivitiesWithProjectPlan", |
|
96 |
"value": "1" |
|
97 |
}, |
|
98 |
{ |
|
99 |
"thresholdName": "searchSubstringsWithProjectPlan", |
|
100 |
"value": "%pl�n projektu%||%project plan%||%plan project%||%projektov� pl�n%" |
|
101 |
} |
|
102 |
] |
|
103 |
}, |
|
104 |
{ |
|
105 |
"antiPattern": "LongOrNonExistentFeedbackLoops", |
|
106 |
"thresholds": [ |
|
107 |
{ |
|
108 |
"thresholdName": "divisionOfIterationsWithFeedbackLoop", |
|
109 |
"value": "50.00f" |
|
110 |
}, |
|
111 |
{ |
|
112 |
"thresholdName": "maxGapBetweenFeedbackLoopRate", |
|
113 |
"value": "2f" |
|
114 |
}, |
|
115 |
{ |
|
116 |
"thresholdName": "searchSubstringsWithFeedbackLoop", |
|
117 |
"value": "%sch�z%z�kazn�k%||%p�edveden�%z�kazn�k%||%z�kazn%demo%||%sch�z%zadavat%||%inform%sch�z%||%z�kazn%||%zadavatel%" |
|
118 |
} |
|
119 |
] |
|
120 |
}, |
|
121 |
{ |
|
122 |
"antiPattern": "NinetyNinetyRule", |
|
123 |
"thresholds": [ |
|
124 |
{ |
|
125 |
"thresholdName": "maxDivisionRange", |
|
126 |
"value": "1.25f" |
|
127 |
}, |
|
128 |
{ |
|
129 |
"thresholdName": "maxBadDivisionLimit", |
|
130 |
"value": "2" |
|
131 |
} |
|
132 |
] |
|
133 |
}, |
|
134 |
{ |
|
135 |
"antiPattern": "UnknownPoster", |
|
136 |
"thresholds": [ |
|
137 |
{ |
|
138 |
"thresholdName": "searchSubstringsInvalidNames", |
|
139 |
"value": "%unknown%||%anonym%" |
|
140 |
} |
|
141 |
] |
|
142 |
}, |
|
143 |
{ |
|
144 |
"antiPattern": "BystanderApathy", |
|
145 |
"thresholds": [ |
|
146 |
{ |
|
147 |
"thresholdName": "searchSubstringsInvalidContributors", |
|
148 |
"value": "%dependabot%" |
|
149 |
}, |
|
150 |
{ |
|
151 |
"thresholdName": "maximumPercentageOfTasksWithoutTeamwork", |
|
152 |
"value": "30f" |
|
153 |
} |
|
154 |
] |
|
155 |
}, |
|
156 |
{ |
|
157 |
"antiPattern": "YetAnotherProgrammer", |
|
158 |
"thresholds": [ |
|
159 |
{ |
|
160 |
"thresholdName": "maxNumberOfNewContributors", |
|
161 |
"value": "5" |
|
162 |
}, |
|
163 |
{ |
|
164 |
"thresholdName": "numberOfFirstMonthsWithoutDetection", |
|
165 |
"value": "2" |
|
166 |
} |
|
167 |
] |
|
168 |
} |
|
169 |
] |
|
170 |
}', |
|
171 |
'Y', 'default configuration' |
|
172 |
|
|
173 |
|
|
174 |
) |
|
175 |
|
|
176 |
commit |
src/main/resources/application.properties | ||
---|---|---|
10 | 10 |
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver |
11 | 11 |
|
12 | 12 |
# mssql database connection: |
13 |
spring.second-datasource.jdbc-url=jdbc:sqlserver://localhost:1433;databaseName=authspade;encrypt=true;trustServerCertificate=true
|
|
14 |
spring.second-datasource.username=test
|
|
15 |
spring.second-datasource.password=test
|
|
16 |
spring.second-datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
|
13 |
spring.second-datasource.jdbc-url=jdbc:mysql://localhost:3306/authspade
|
|
14 |
spring.second-datasource.username=root
|
|
15 |
spring.second-datasource.password= |
|
16 |
spring.second-datasource.driverClassName=com.mysql.cj.jdbc.Driver
|
|
17 | 17 |
|
18 | 18 |
# admin account username and password: |
19 | 19 |
account.user.name=root |
Také k dispozici: Unified diff
moved mssql database to new mysql db schema