1 |
c0e44337
|
Jiri Trefil
|
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 |
ba18288a
|
Jiri Trefil
|
--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 |
c0e44337
|
Jiri Trefil
|
--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 |
ba18288a
|
Jiri Trefil
|
configurationName nvarchar(255) not null,
|
29 |
c0e44337
|
Jiri Trefil
|
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 |
ba18288a
|
Jiri Trefil
|
"value": "%pl�n projektu%||%project plan%||%plan project%||%projektov� pl�n%"
|
111 |
c0e44337
|
Jiri Trefil
|
}
|
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 |
ba18288a
|
Jiri Trefil
|
"value": "%sch�z%z�kazn�k%||%p�edveden�%z�kazn�k%||%z�kazn%demo%||%sch�z%zadavat%||%inform%sch�z%||%z�kazn%||%zadavatel%"
|
128 |
c0e44337
|
Jiri Trefil
|
}
|
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 |
ba18288a
|
Jiri Trefil
|
insert into user_configurations(userId,configId,configurationName) values (1,1,'default config')
|
186 |
c0e44337
|
Jiri Trefil
|
|
187 |
ba18288a
|
Jiri Trefil
|
commit
|