spade-fork/db/spade-configurations.sql @ cf7759c3
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 |
|
21 |
|
22 |
--rozkladova tabulka mapujici uzivatele a k nemu asociovane konfigurace
|
23 |
if not exists (select * from sysobjects where name='user_configurations' and xtype='U') |
24 |
create table user_configurations ( |
25 |
userId int not null, |
26 |
configId int not null, |
27 |
foreign key(userId) references users(id), |
28 |
foreign key(configId) references configurations(id), |
29 |
primary key(userId,configId) |
30 |
)
|
31 |
|
32 |
insert into configurations (config, isDefault) values ( |
33 |
'{
|
34 |
"configuration": [
|
35 |
{
|
36 |
"antiPattern": "TooLongSprint",
|
37 |
"thresholds": [
|
38 |
{
|
39 |
"thresholdName": "maxIterationLength",
|
40 |
"value": "21"
|
41 |
},
|
42 |
{
|
43 |
"thresholdName": "maxNumberOfTooLongIterations",
|
44 |
"value": "0"
|
45 |
}
|
46 |
]
|
47 |
},
|
48 |
{
|
49 |
"antiPattern": "VaryingSprintLength",
|
50 |
"thresholds": [
|
51 |
{
|
52 |
"thresholdName": "maxDaysDifference",
|
53 |
"value": "7"
|
54 |
},
|
55 |
{
|
56 |
"thresholdName": "maxIterationChanged",
|
57 |
"value": "1"
|
58 |
}
|
59 |
]
|
60 |
},
|
61 |
{
|
62 |
"antiPattern": "BusinessAsUsual",
|
63 |
"thresholds": [
|
64 |
{
|
65 |
"thresholdName": "divisionOfIterationsWithRetrospective",
|
66 |
"value": "66.66f"
|
67 |
},
|
68 |
{
|
69 |
"thresholdName": "searchSubstringsWithRetrospective",
|
70 |
"value": "%retr%||%revi%||%week%scrum%"
|
71 |
}
|
72 |
]
|
73 |
},
|
74 |
{
|
75 |
"antiPattern": "SpecifyNothing",
|
76 |
"thresholds": [
|
77 |
{
|
78 |
"thresholdName": "minNumberOfWikiPagesWithSpecification",
|
79 |
"value": "1"
|
80 |
},
|
81 |
{
|
82 |
"thresholdName": "minNumberOfActivitiesWithSpecification",
|
83 |
"value": "1"
|
84 |
},
|
85 |
{
|
86 |
"thresholdName": "minAvgLengthOfActivityDescription",
|
87 |
"value": "150"
|
88 |
},
|
89 |
{
|
90 |
"thresholdName": "searchSubstringsWithProjectSpecification",
|
91 |
"value": "%dsp%||%specifikace%||%specification%||%vize%proj%||%vize%produ%"
|
92 |
}
|
93 |
]
|
94 |
},
|
95 |
{
|
96 |
"antiPattern": "RoadToNowhere",
|
97 |
"thresholds": [
|
98 |
{
|
99 |
"thresholdName": "minNumberOfWikiPagesWithProjectPlan",
|
100 |
"value": "1"
|
101 |
},
|
102 |
{
|
103 |
"thresholdName": "minNumberOfActivitiesWithProjectPlan",
|
104 |
"value": "1"
|
105 |
},
|
106 |
{
|
107 |
"thresholdName": "searchSubstringsWithProjectPlan",
|
108 |
"value": "%pl?n projektu%||%project plan%||%plan project%||%projektov? pl?n%"
|
109 |
}
|
110 |
]
|
111 |
},
|
112 |
{
|
113 |
"antiPattern": "LongOrNonExistentFeedbackLoops",
|
114 |
"thresholds": [
|
115 |
{
|
116 |
"thresholdName": "divisionOfIterationsWithFeedbackLoop",
|
117 |
"value": "50.00f"
|
118 |
},
|
119 |
{
|
120 |
"thresholdName": "maxGapBetweenFeedbackLoopRate",
|
121 |
"value": "2f"
|
122 |
},
|
123 |
{
|
124 |
"thresholdName": "searchSubstringsWithFeedbackLoop",
|
125 |
"value": "%sch?z%z?kazn?k%||%p?edveden?%z?kazn?k%||%z?kazn%demo%||%sch?z%zadavat%||%inform%sch?z%||%z?kazn%||%zadavatel%"
|
126 |
}
|
127 |
]
|
128 |
},
|
129 |
{
|
130 |
"antiPattern": "NinetyNinetyRule",
|
131 |
"thresholds": [
|
132 |
{
|
133 |
"thresholdName": "maxDivisionRange",
|
134 |
"value": "1.25f"
|
135 |
},
|
136 |
{
|
137 |
"thresholdName": "maxBadDivisionLimit",
|
138 |
"value": "2"
|
139 |
}
|
140 |
]
|
141 |
},
|
142 |
{
|
143 |
"antiPattern": "UnknownPoster",
|
144 |
"thresholds": [
|
145 |
{
|
146 |
"thresholdName": "searchSubstringsInvalidNames",
|
147 |
"value": "%unknown%||%anonym%"
|
148 |
}
|
149 |
]
|
150 |
},
|
151 |
{
|
152 |
"antiPattern": "BystanderApathy",
|
153 |
"thresholds": [
|
154 |
{
|
155 |
"thresholdName": "searchSubstringsInvalidContributors",
|
156 |
"value": "%dependabot%"
|
157 |
},
|
158 |
{
|
159 |
"thresholdName": "maximumPercentageOfTasksWithoutTeamwork",
|
160 |
"value": "30f"
|
161 |
}
|
162 |
]
|
163 |
},
|
164 |
{
|
165 |
"antiPattern": "YetAnotherProgrammer",
|
166 |
"thresholds": [
|
167 |
{
|
168 |
"thresholdName": "maxNumberOfNewContributors",
|
169 |
"value": "5"
|
170 |
},
|
171 |
{
|
172 |
"thresholdName": "numberOfFirstMonthsWithoutDetection",
|
173 |
"value": "2"
|
174 |
}
|
175 |
]
|
176 |
}
|
177 |
]
|
178 |
}', |
179 |
'Y'
|
180 |
|
181 |
|
182 |
)
|
183 |
|
184 |
commit
|