1 CREATE TABLE "ORGANIZATIONS" (
2 "UUID" VARCHAR(40) NOT NULL,
3 "KEE" VARCHAR(300) NOT NULL,
4 "NAME" VARCHAR(300) NOT NULL,
5 "DESCRIPTION" VARCHAR(256),
7 "AVATAR_URL" VARCHAR(256),
8 "GUARDED" BOOLEAN NOT NULL,
9 "DEFAULT_PERM_TEMPLATE_PROJECT" VARCHAR(40),
10 "DEFAULT_PERM_TEMPLATE_APP" VARCHAR(40),
11 "DEFAULT_PERM_TEMPLATE_PORT" VARCHAR(40),
12 "DEFAULT_GROUP_ID" INTEGER,
13 "DEFAULT_QUALITY_GATE_UUID" VARCHAR(40) NOT NULL,
14 "NEW_PROJECT_PRIVATE" BOOLEAN NOT NULL,
15 "SUBSCRIPTION" VARCHAR(40) NOT NULL,
16 "CREATED_AT" BIGINT NOT NULL,
17 "UPDATED_AT" BIGINT NOT NULL,
19 CONSTRAINT "PK_ORGANIZATIONS" PRIMARY KEY ("UUID")
21 CREATE UNIQUE INDEX "ORGANIZATION_KEY" ON "ORGANIZATIONS" ("KEE");
23 CREATE TABLE "ORGANIZATION_MEMBERS" (
24 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
25 "USER_ID" INTEGER NOT NULL,
27 CONSTRAINT "PK_ORGANIZATION_MEMBERS" PRIMARY KEY ("ORGANIZATION_UUID", "USER_ID")
29 CREATE INDEX "IX_ORG_MEMBERS_ON_USER_ID" ON "ORGANIZATION_MEMBERS" ("USER_ID");
31 CREATE TABLE "GROUPS_USERS" (
35 CREATE INDEX "INDEX_GROUPS_USERS_ON_GROUP_ID" ON "GROUPS_USERS" ("GROUP_ID");
36 CREATE INDEX "INDEX_GROUPS_USERS_ON_USER_ID" ON "GROUPS_USERS" ("USER_ID");
37 CREATE UNIQUE INDEX "GROUPS_USERS_UNIQUE" ON "GROUPS_USERS" ("GROUP_ID", "USER_ID");
40 CREATE TABLE "RULES_PARAMETERS" (
41 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
42 "RULE_ID" INTEGER NOT NULL,
43 "NAME" VARCHAR(128) NOT NULL,
44 "PARAM_TYPE" VARCHAR(512) NOT NULL,
45 "DEFAULT_VALUE" VARCHAR(4000),
46 "DESCRIPTION" VARCHAR(4000)
48 CREATE INDEX "RULES_PARAMETERS_RULE_ID" ON "RULES_PARAMETERS" ("RULE_ID");
49 CREATE UNIQUE INDEX "RULES_PARAMETERS_UNIQUE" ON "RULES_PARAMETERS" ("RULE_ID", "NAME");
52 CREATE TABLE "RULES_PROFILES" (
53 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
54 "NAME" VARCHAR(100) NOT NULL,
55 "LANGUAGE" VARCHAR(20),
56 "KEE" VARCHAR(255) NOT NULL,
57 "RULES_UPDATED_AT" VARCHAR(100),
58 "CREATED_AT" TIMESTAMP,
59 "UPDATED_AT" TIMESTAMP,
60 "IS_BUILT_IN" BOOLEAN NOT NULL
62 CREATE UNIQUE INDEX "UNIQ_QPROF_KEY" ON "RULES_PROFILES" ("KEE");
65 CREATE TABLE "ORG_QPROFILES" (
66 "UUID" VARCHAR(255) NOT NULL,
67 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
68 "RULES_PROFILE_UUID" VARCHAR(255) NOT NULL,
69 "PARENT_UUID" VARCHAR(255),
71 "USER_UPDATED_AT" BIGINT,
72 "CREATED_AT" BIGINT NOT NULL,
73 "UPDATED_AT" BIGINT NOT NULL,
75 CONSTRAINT "PK_ORG_QPROFILES" PRIMARY KEY ("UUID")
77 CREATE INDEX "ORG_QPROFILES_ORG_UUID" ON "ORG_QPROFILES" ("ORGANIZATION_UUID");
78 CREATE INDEX "ORG_QPROFILES_RP_UUID" ON "ORG_QPROFILES" ("RULES_PROFILE_UUID");
79 CREATE INDEX "ORG_QPROFILES_PARENT_UUID" ON "ORG_QPROFILES" ("PARENT_UUID");
82 CREATE TABLE "DEFAULT_QPROFILES" (
83 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
84 "LANGUAGE" VARCHAR(20) NOT NULL,
85 "QPROFILE_UUID" VARCHAR(255) NOT NULL,
86 "CREATED_AT" BIGINT NOT NULL,
87 "UPDATED_AT" BIGINT NOT NULL,
89 CONSTRAINT "PK_DEFAULT_QPROFILES" PRIMARY KEY ("ORGANIZATION_UUID", "LANGUAGE")
91 CREATE UNIQUE INDEX "UNIQ_DEFAULT_QPROFILES_UUID" ON "DEFAULT_QPROFILES" ("QPROFILE_UUID");
94 CREATE TABLE "PROJECT_QPROFILES" (
95 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
96 "PROJECT_UUID" VARCHAR(50) NOT NULL,
97 "PROFILE_KEY" VARCHAR(50) NOT NULL
99 CREATE UNIQUE INDEX "UNIQ_PROJECT_QPROFILES" ON "PROJECT_QPROFILES" ("PROJECT_UUID", "PROFILE_KEY");
102 CREATE TABLE "QPROFILE_EDIT_USERS" (
103 "UUID" VARCHAR(40) NOT NULL,
104 "USER_ID" INTEGER NOT NULL,
105 "QPROFILE_UUID" VARCHAR(255) NOT NULL,
108 CONSTRAINT "PK_QPROFILE_EDIT_USERS" PRIMARY KEY ("UUID")
110 CREATE INDEX "QPROFILE_EDIT_USERS_QPROFILE" ON "QPROFILE_EDIT_USERS" ("QPROFILE_UUID");
111 CREATE UNIQUE INDEX "QPROFILE_EDIT_USERS_UNIQUE" ON "QPROFILE_EDIT_USERS" ("USER_ID", "QPROFILE_UUID");
114 CREATE TABLE "QPROFILE_EDIT_GROUPS" (
115 "UUID" VARCHAR(40) NOT NULL,
116 "GROUP_ID" INTEGER NOT NULL,
117 "QPROFILE_UUID" VARCHAR(255) NOT NULL,
120 CONSTRAINT "PK_QPROFILE_EDIT_GROUPS" PRIMARY KEY ("UUID")
122 CREATE INDEX "QPROFILE_EDIT_GROUPS_QPROFILE" ON "QPROFILE_EDIT_GROUPS" ("QPROFILE_UUID");
123 CREATE UNIQUE INDEX "QPROFILE_EDIT_GROUPS_UNIQUE" ON "QPROFILE_EDIT_GROUPS" ("GROUP_ID", "QPROFILE_UUID");
126 CREATE TABLE "GROUPS" (
127 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
128 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
130 "DESCRIPTION" VARCHAR(200),
131 "CREATED_AT" TIMESTAMP,
132 "UPDATED_AT" TIMESTAMP
136 CREATE TABLE "SNAPSHOTS" (
137 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
138 "UUID" VARCHAR(50) NOT NULL,
141 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
142 "STATUS" VARCHAR(4) NOT NULL DEFAULT 'U',
143 "PURGE_STATUS" INTEGER,
144 "ISLAST" BOOLEAN NOT NULL DEFAULT FALSE,
145 "VERSION" VARCHAR(500),
146 "BUILD_STRING" VARCHAR(100),
147 "PERIOD1_MODE" VARCHAR(100),
148 "PERIOD1_PARAM" VARCHAR(100),
149 "PERIOD1_DATE" BIGINT,
150 "PERIOD2_MODE" VARCHAR(100),
151 "PERIOD2_PARAM" VARCHAR(100),
152 "PERIOD2_DATE" BIGINT,
153 "PERIOD3_MODE" VARCHAR(100),
154 "PERIOD3_PARAM" VARCHAR(100),
155 "PERIOD3_DATE" BIGINT,
156 "PERIOD4_MODE" VARCHAR(100),
157 "PERIOD4_PARAM" VARCHAR(100),
158 "PERIOD4_DATE" BIGINT,
159 "PERIOD5_MODE" VARCHAR(100),
160 "PERIOD5_PARAM" VARCHAR(100),
161 "PERIOD5_DATE" BIGINT,
162 "REVISION" VARCHAR(100)
164 CREATE INDEX "SNAPSHOT_COMPONENT" ON "SNAPSHOTS" ("COMPONENT_UUID");
165 CREATE UNIQUE INDEX "ANALYSES_UUID" ON "SNAPSHOTS" ("UUID");
167 CREATE TABLE "GROUP_ROLES" (
168 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
169 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
171 "RESOURCE_ID" INTEGER,
172 "ROLE" VARCHAR(64) NOT NULL
174 CREATE INDEX "GROUP_ROLES_RESOURCE" ON "GROUP_ROLES" ("RESOURCE_ID");
175 CREATE UNIQUE INDEX "UNIQ_GROUP_ROLES" ON "GROUP_ROLES" ("ORGANIZATION_UUID", "GROUP_ID", "RESOURCE_ID", "ROLE");
178 CREATE TABLE "RULE_REPOSITORIES" (
179 "KEE" VARCHAR(200) NOT NULL,
180 "LANGUAGE" VARCHAR(20) NOT NULL,
181 "NAME" VARCHAR(4000) NOT NULL,
184 CONSTRAINT "PK_RULE_REPOSITORIES" PRIMARY KEY ("KEE")
187 CREATE TABLE "DEPRECATED_RULE_KEYS" (
188 "UUID" VARCHAR(40) NOT NULL,
189 "RULE_ID" INTEGER NOT NULL,
190 "OLD_REPOSITORY_KEY" VARCHAR(200) NOT NULL,
191 "OLD_RULE_KEY" VARCHAR(255) NOT NULL,
194 CONSTRAINT "PK_DEPRECATED_RULE_KEYS" PRIMARY KEY ("UUID")
196 CREATE UNIQUE INDEX "UNIQ_DEPRECATED_RULE_KEYS" ON "DEPRECATED_RULE_KEYS" ("OLD_REPOSITORY_KEY", "OLD_RULE_KEY");
197 CREATE INDEX "RULE_ID_DEPRECATED_RULE_KEYS" ON "DEPRECATED_RULE_KEYS" ("RULE_ID");
199 CREATE TABLE "RULES" (
200 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
201 "PLUGIN_KEY" VARCHAR(200),
202 "PLUGIN_RULE_KEY" VARCHAR(200) NOT NULL,
203 "PLUGIN_NAME" VARCHAR(255) NOT NULL,
204 "DESCRIPTION" VARCHAR(16777215),
205 "DESCRIPTION_FORMAT" VARCHAR(20),
207 "IS_TEMPLATE" BOOLEAN DEFAULT FALSE,
208 "IS_EXTERNAL" BOOLEAN NOT NULL,
209 "IS_AD_HOC" BOOLEAN NOT NULL,
210 "TEMPLATE_ID" INTEGER,
211 "PLUGIN_CONFIG_KEY" VARCHAR(200),
213 "STATUS" VARCHAR(40),
214 "LANGUAGE" VARCHAR(20),
215 "SCOPE" VARCHAR(20) NOT NULL,
216 "DEF_REMEDIATION_FUNCTION" VARCHAR(20),
217 "DEF_REMEDIATION_GAP_MULT" VARCHAR(20),
218 "DEF_REMEDIATION_BASE_EFFORT" VARCHAR(20),
219 "GAP_DESCRIPTION" VARCHAR(4000),
220 "SYSTEM_TAGS" VARCHAR(4000),
221 "SECURITY_STANDARDS" VARCHAR(4000),
226 CREATE UNIQUE INDEX "RULES_REPO_KEY" ON "RULES" ("PLUGIN_NAME", "PLUGIN_RULE_KEY");
228 CREATE TABLE "RULES_METADATA" (
229 "RULE_ID" INTEGER NOT NULL,
230 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
232 "NOTE_USER_UUID" VARCHAR(255),
233 "NOTE_CREATED_AT" BIGINT,
234 "NOTE_UPDATED_AT" BIGINT,
235 "REMEDIATION_FUNCTION" VARCHAR(20),
236 "REMEDIATION_GAP_MULT" VARCHAR(20),
237 "REMEDIATION_BASE_EFFORT" VARCHAR(20),
238 "TAGS" VARCHAR(4000),
239 "AD_HOC_NAME" VARCHAR(200),
240 "AD_HOC_DESCRIPTION" VARCHAR(16777215),
241 "AD_HOC_SEVERITY" VARCHAR(10),
242 "AD_HOC_TYPE" TINYINT,
243 "CREATED_AT" BIGINT NOT NULL,
244 "UPDATED_AT" BIGINT NOT NULL,
246 CONSTRAINT "PK_RULES_METADATA" PRIMARY KEY ("RULE_ID", "ORGANIZATION_UUID")
249 CREATE TABLE "EVENTS" (
250 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
251 "UUID" VARCHAR(40) NOT NULL,
253 "ANALYSIS_UUID" VARCHAR(50) NOT NULL,
254 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
255 "CATEGORY" VARCHAR(50),
256 "EVENT_DATE" BIGINT NOT NULL,
257 "CREATED_AT" BIGINT NOT NULL,
258 "DESCRIPTION" VARCHAR(4000),
259 "EVENT_DATA" VARCHAR(4000)
261 CREATE INDEX "EVENTS_ANALYSIS" ON "EVENTS" ("ANALYSIS_UUID");
262 CREATE INDEX "EVENTS_COMPONENT_UUID" ON "EVENTS" ("COMPONENT_UUID");
263 CREATE UNIQUE INDEX "EVENTS_UUID" ON "EVENTS" ("UUID");
265 CREATE TABLE "EVENT_COMPONENT_CHANGES" (
266 "UUID" VARCHAR(40) NOT NULL,
267 "EVENT_UUID" VARCHAR(40) NOT NULL,
268 "EVENT_COMPONENT_UUID" VARCHAR(50) NOT NULL,
269 "EVENT_ANALYSIS_UUID" VARCHAR(50) NOT NULL,
270 "CHANGE_CATEGORY" VARCHAR(20) NOT NULL,
271 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
272 "COMPONENT_KEY" VARCHAR(400) NOT NULL,
273 "COMPONENT_NAME" VARCHAR(2000) NOT NULL,
274 "COMPONENT_BRANCH_KEY" VARCHAR(255),
275 "CREATED_AT" BIGINT NOT NULL,
277 CONSTRAINT "PK_EVENT_COMPONENT_CHANGES" PRIMARY KEY ("UUID")
279 CREATE UNIQUE INDEX "EVENT_COMPONENT_CHANGES_UNIQUE" ON "EVENT_COMPONENT_CHANGES" ("EVENT_UUID", "CHANGE_CATEGORY", "COMPONENT_UUID");
280 CREATE INDEX "EVENT_CPNT_CHANGES_CPNT" ON "EVENT_COMPONENT_CHANGES" ("EVENT_COMPONENT_UUID");
281 CREATE INDEX "EVENT_CPNT_CHANGES_ANALYSIS" ON "EVENT_COMPONENT_CHANGES" ("EVENT_ANALYSIS_UUID");
284 CREATE TABLE "QUALITY_GATES" (
285 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
286 "UUID" VARCHAR(40) NOT NULL,
287 "NAME" VARCHAR(100) NOT NULL,
288 "IS_BUILT_IN" BOOLEAN NOT NULL,
289 "CREATED_AT" TIMESTAMP,
290 "UPDATED_AT" TIMESTAMP,
292 CREATE UNIQUE INDEX "UNIQ_QUALITY_GATES_UUID" ON "QUALITY_GATES" ("UUID");
295 CREATE TABLE "QUALITY_GATE_CONDITIONS" (
296 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
299 "OPERATOR" VARCHAR(3),
300 "VALUE_ERROR" VARCHAR(64),
301 "VALUE_WARNING" VARCHAR(64),
303 "CREATED_AT" TIMESTAMP,
304 "UPDATED_AT" TIMESTAMP,
307 CREATE TABLE "ORG_QUALITY_GATES" (
308 "UUID" VARCHAR(40) NOT NULL,
309 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
310 "QUALITY_GATE_UUID" VARCHAR(40) NOT NULL,
312 CONSTRAINT "PK_ORG_QUALITY_GATES" PRIMARY KEY ("UUID")
314 CREATE UNIQUE INDEX "UNIQ_ORG_QUALITY_GATES" ON "ORG_QUALITY_GATES" ("ORGANIZATION_UUID","QUALITY_GATE_UUID");
316 CREATE TABLE "PROPERTIES" (
317 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
318 "PROP_KEY" VARCHAR(512) NOT NULL,
319 "RESOURCE_ID" INTEGER,
321 "IS_EMPTY" BOOLEAN NOT NULL,
322 "TEXT_VALUE" VARCHAR(4000),
326 CREATE INDEX "PROPERTIES_KEY" ON "PROPERTIES" ("PROP_KEY");
329 CREATE TABLE "PROJECT_LINKS" (
330 "UUID" VARCHAR(40) NOT NULL,
331 "PROJECT_UUID" VARCHAR(50) NOT NULL,
332 "LINK_TYPE" VARCHAR(20) NOT NULL,
334 "HREF" VARCHAR(2048) NOT NULL,
338 CONSTRAINT "PK_PROJECT_LINKS" PRIMARY KEY ("UUID")
340 CREATE INDEX "PROJECT_LINKS_PROJECT" ON "PROJECT_LINKS" ("PROJECT_UUID");
343 CREATE TABLE "DUPLICATIONS_INDEX" (
344 "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
345 "ANALYSIS_UUID" VARCHAR(50) NOT NULL,
346 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
347 "HASH" VARCHAR(50) NOT NULL,
348 "INDEX_IN_FILE" INTEGER NOT NULL,
349 "START_LINE" INTEGER NOT NULL,
350 "END_LINE" INTEGER NOT NULL
352 CREATE INDEX "DUPLICATIONS_INDEX_HASH" ON "DUPLICATIONS_INDEX" ("HASH");
353 CREATE INDEX "DUPLICATION_ANALYSIS_COMPONENT" ON "DUPLICATIONS_INDEX" ("ANALYSIS_UUID", "COMPONENT_UUID");
356 CREATE TABLE "LIVE_MEASURES" (
357 "UUID" VARCHAR(40) NOT NULL,
358 "PROJECT_UUID" VARCHAR(50) NOT NULL,
359 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
360 "METRIC_ID" INTEGER NOT NULL,
362 "TEXT_VALUE" VARCHAR(4000),
364 "MEASURE_DATA" BINARY,
365 "UPDATE_MARKER" VARCHAR(40),
366 "CREATED_AT" BIGINT NOT NULL,
367 "UPDATED_AT" BIGINT NOT NULL,
369 CONSTRAINT "PK_LIVE_MEASURES" PRIMARY KEY ("UUID")
371 CREATE INDEX "LIVE_MEASURES_PROJECT" ON "LIVE_MEASURES" ("PROJECT_UUID");
372 CREATE UNIQUE INDEX "LIVE_MEASURES_COMPONENT" ON "LIVE_MEASURES" ("COMPONENT_UUID", "METRIC_ID");
375 CREATE TABLE "PROJECT_MEASURES" (
376 "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
378 "METRIC_ID" INTEGER NOT NULL,
379 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
380 "ANALYSIS_UUID" VARCHAR(50) NOT NULL,
381 "TEXT_VALUE" VARCHAR(4000),
382 "ALERT_STATUS" VARCHAR(5),
383 "ALERT_TEXT" VARCHAR(4000),
384 "DESCRIPTION" VARCHAR(4000),
386 "VARIATION_VALUE_1" DOUBLE,
387 "VARIATION_VALUE_2" DOUBLE,
388 "VARIATION_VALUE_3" DOUBLE,
389 "VARIATION_VALUE_4" DOUBLE,
390 "VARIATION_VALUE_5" DOUBLE,
391 "MEASURE_DATA" BINARY
393 CREATE INDEX "MEASURES_COMPONENT_UUID" ON "PROJECT_MEASURES" ("COMPONENT_UUID");
394 CREATE INDEX "MEASURES_ANALYSIS_METRIC" ON "PROJECT_MEASURES" ("ANALYSIS_UUID", "METRIC_ID");
397 CREATE TABLE "INTERNAL_PROPERTIES" (
398 "KEE" VARCHAR(20) NOT NULL,
399 "IS_EMPTY" BOOLEAN NOT NULL,
400 "TEXT_VALUE" VARCHAR(4000),
404 CONSTRAINT "PK_INTERNAL_PROPERTIES" PRIMARY KEY ("KEE")
408 CREATE TABLE "PROJECTS" (
409 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
410 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
412 "UUID" VARCHAR(50) NOT NULL,
413 "UUID_PATH" VARCHAR(1500) NOT NULL,
414 "ROOT_UUID" VARCHAR(50) NOT NULL,
415 "PROJECT_UUID" VARCHAR(50) NOT NULL,
416 "MODULE_UUID" VARCHAR(50),
417 "MODULE_UUID_PATH" VARCHAR(1500),
418 "MAIN_BRANCH_PROJECT_UUID" VARCHAR(50),
419 "NAME" VARCHAR(2000),
420 "DESCRIPTION" VARCHAR(2000),
421 "PRIVATE" BOOLEAN NOT NULL,
423 "ENABLED" BOOLEAN NOT NULL DEFAULT TRUE,
425 "QUALIFIER" VARCHAR(10),
426 "DEPRECATED_KEE" VARCHAR(400),
427 "PATH" VARCHAR(2000),
428 "LANGUAGE" VARCHAR(20),
429 "COPY_COMPONENT_UUID" VARCHAR(50),
430 "LONG_NAME" VARCHAR(2000),
431 "DEVELOPER_UUID" VARCHAR(50),
432 "CREATED_AT" TIMESTAMP,
433 "AUTHORIZATION_UPDATED_AT" BIGINT,
435 "B_COPY_COMPONENT_UUID" VARCHAR(50),
436 "B_DESCRIPTION" VARCHAR(2000),
438 "B_UUID_PATH" VARCHAR(1500),
439 "B_LANGUAGE" VARCHAR(20),
440 "B_LONG_NAME" VARCHAR(500),
441 "B_MODULE_UUID" VARCHAR(50),
442 "B_MODULE_UUID_PATH" VARCHAR(1500),
443 "B_NAME" VARCHAR(500),
444 "B_PATH" VARCHAR(2000),
445 "B_QUALIFIER" VARCHAR(10)
447 CREATE INDEX "PROJECTS_ORGANIZATION" ON "PROJECTS" ("ORGANIZATION_UUID");
448 CREATE UNIQUE INDEX "PROJECTS_KEE" ON "PROJECTS" ("KEE");
449 CREATE INDEX "PROJECTS_ROOT_UUID" ON "PROJECTS" ("ROOT_UUID");
450 CREATE UNIQUE INDEX "PROJECTS_UUID" ON "PROJECTS" ("UUID");
451 CREATE INDEX "PROJECTS_PROJECT_UUID" ON "PROJECTS" ("PROJECT_UUID");
452 CREATE INDEX "PROJECTS_MODULE_UUID" ON "PROJECTS" ("MODULE_UUID");
453 CREATE INDEX "PROJECTS_QUALIFIER" ON "PROJECTS" ("QUALIFIER");
455 CREATE TABLE "INTERNAL_COMPONENT_PROPS" (
456 "UUID" VARCHAR(40) NOT NULL,
457 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
458 "KEE" VARCHAR(512) NOT NULL,
459 "VALUE" VARCHAR(4000),
460 "CREATED_AT" BIGINT NOT NULL,
461 "UPDATED_AT" BIGINT NOT NULL,
462 CONSTRAINT "INTERNAL_COMPONENT_PROPS_UUID" PRIMARY KEY ("UUID")
464 CREATE UNIQUE INDEX "UNIQUE_COMPONENT_UUID_KEE" ON "INTERNAL_COMPONENT_PROPS" ("COMPONENT_UUID", "KEE");
466 CREATE TABLE "MANUAL_MEASURES" (
467 "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
468 "METRIC_ID" INTEGER NOT NULL,
469 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
471 "TEXT_VALUE" VARCHAR(4000),
472 "USER_UUID" VARCHAR(255),
473 "DESCRIPTION" VARCHAR(4000),
477 CREATE INDEX "MANUAL_MEASURES_COMPONENT_UUID" ON "MANUAL_MEASURES" ("COMPONENT_UUID");
480 CREATE TABLE "ACTIVE_RULES" (
481 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
482 "PROFILE_ID" INTEGER NOT NULL,
483 "RULE_ID" INTEGER NOT NULL,
484 "FAILURE_LEVEL" INTEGER NOT NULL,
485 "INHERITANCE" VARCHAR(10),
489 CREATE UNIQUE INDEX "ACTIVE_RULES_UNIQUE" ON "ACTIVE_RULES" ("PROFILE_ID","RULE_ID");
492 CREATE TABLE "NOTIFICATIONS" (
493 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
498 CREATE TABLE "USER_ROLES" (
499 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
500 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
502 "RESOURCE_ID" INTEGER,
503 "ROLE" VARCHAR(64) NOT NULL
505 CREATE INDEX "USER_ROLES_RESOURCE" ON "USER_ROLES" ("RESOURCE_ID");
506 CREATE INDEX "USER_ROLES_USER" ON "USER_ROLES" ("USER_ID");
509 CREATE TABLE "ACTIVE_RULE_PARAMETERS" (
510 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
511 "ACTIVE_RULE_ID" INTEGER NOT NULL,
512 "RULES_PARAMETER_ID" INTEGER NOT NULL,
513 "RULES_PARAMETER_KEY" VARCHAR(128),
514 "VALUE" VARCHAR(4000)
516 CREATE INDEX "IX_ARP_ON_ACTIVE_RULE_ID" ON "ACTIVE_RULE_PARAMETERS" ("ACTIVE_RULE_ID");
519 CREATE TABLE "USERS" (
520 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
521 "UUID" VARCHAR(255) NOT NULL,
522 "LOGIN" VARCHAR(255) NOT NULL,
524 "EMAIL" VARCHAR(100),
525 "CRYPTED_PASSWORD" VARCHAR(100),
527 "HASH_METHOD" VARCHAR(10),
528 "ACTIVE" BOOLEAN DEFAULT TRUE,
529 "SCM_ACCOUNTS" VARCHAR(4000),
530 "EXTERNAL_ID" VARCHAR(255) NOT NULL,
531 "EXTERNAL_LOGIN" VARCHAR(255) NOT NULL,
532 "EXTERNAL_IDENTITY_PROVIDER" VARCHAR(100) NOT NULL,
533 "IS_ROOT" BOOLEAN NOT NULL,
534 "USER_LOCAL" BOOLEAN,
535 "ONBOARDED" BOOLEAN NOT NULL,
536 "HOMEPAGE_TYPE" VARCHAR(40),
537 "HOMEPAGE_PARAMETER" VARCHAR(40),
538 "ORGANIZATION_UUID" VARCHAR(40),
539 "LAST_CONNECTION_DATE" BIGINT,
543 CREATE UNIQUE INDEX "USERS_UUID" ON "USERS" ("UUID");
544 CREATE UNIQUE INDEX "USERS_LOGIN" ON "USERS" ("LOGIN");
545 CREATE UNIQUE INDEX "UNIQ_EXTERNAL_ID" ON "USERS" ("EXTERNAL_IDENTITY_PROVIDER", "EXTERNAL_ID");
546 CREATE UNIQUE INDEX "UNIQ_EXTERNAL_LOGIN" ON "USERS" ("EXTERNAL_IDENTITY_PROVIDER", "EXTERNAL_LOGIN");
547 CREATE INDEX "USERS_UPDATED_AT" ON "USERS" ("UPDATED_AT");
550 CREATE TABLE "METRICS" (
551 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
552 "NAME" VARCHAR(64) NOT NULL,
553 "DESCRIPTION" VARCHAR(255),
554 "DIRECTION" INTEGER NOT NULL DEFAULT 0,
555 "DOMAIN" VARCHAR(64),
556 "SHORT_NAME" VARCHAR(64),
557 "QUALITATIVE" BOOLEAN NOT NULL DEFAULT FALSE,
558 "VAL_TYPE" VARCHAR(8),
559 "USER_MANAGED" BOOLEAN DEFAULT FALSE,
560 "ENABLED" BOOLEAN DEFAULT TRUE,
561 "WORST_VALUE" DOUBLE,
563 "OPTIMIZED_BEST_VALUE" BOOLEAN,
565 "DELETE_HISTORICAL_DATA" BOOLEAN,
566 "DECIMAL_SCALE" INTEGER
568 CREATE UNIQUE INDEX "METRICS_UNIQUE_NAME" ON "METRICS" ("NAME");
571 CREATE TABLE "ISSUES" (
572 "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
573 "KEE" VARCHAR(50) UNIQUE NOT NULL,
574 "COMPONENT_UUID" VARCHAR(50),
575 "PROJECT_UUID" VARCHAR(50),
577 "SEVERITY" VARCHAR(10),
578 "MANUAL_SEVERITY" BOOLEAN NOT NULL,
579 "MESSAGE" VARCHAR(4000),
583 "STATUS" VARCHAR(20),
584 "RESOLUTION" VARCHAR(20),
585 "CHECKSUM" VARCHAR(1000),
586 "REPORTER" VARCHAR(255),
587 "ASSIGNEE" VARCHAR(255),
588 "AUTHOR_LOGIN" VARCHAR(255),
589 "ACTION_PLAN_KEY" VARCHAR(50) NULL,
590 "ISSUE_ATTRIBUTES" VARCHAR(4000),
591 "TAGS" VARCHAR(4000),
592 "ISSUE_CREATION_DATE" BIGINT,
593 "ISSUE_CLOSE_DATE" BIGINT,
594 "ISSUE_UPDATE_DATE" BIGINT,
598 "ISSUE_TYPE" TINYINT,
599 "FROM_HOTSPOT" BOOLEAN NULL
601 CREATE UNIQUE INDEX "ISSUES_KEE" ON "ISSUES" ("KEE");
602 CREATE INDEX "ISSUES_COMPONENT_UUID" ON "ISSUES" ("COMPONENT_UUID");
603 CREATE INDEX "ISSUES_PROJECT_UUID" ON "ISSUES" ("PROJECT_UUID");
604 CREATE INDEX "ISSUES_RULE_ID" ON "ISSUES" ("RULE_ID");
605 CREATE INDEX "ISSUES_RESOLUTION" ON "ISSUES" ("RESOLUTION");
606 CREATE INDEX "ISSUES_ASSIGNEE" ON "ISSUES" ("ASSIGNEE");
607 CREATE INDEX "ISSUES_CREATION_DATE" ON "ISSUES" ("ISSUE_CREATION_DATE");
608 CREATE INDEX "ISSUES_UPDATED_AT" ON "ISSUES" ("UPDATED_AT");
611 CREATE TABLE "ISSUE_CHANGES" (
612 "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
614 "ISSUE_KEY" VARCHAR(50) NOT NULL,
615 "USER_LOGIN" VARCHAR(255),
616 "CHANGE_TYPE" VARCHAR(40),
617 "CHANGE_DATA" VARCHAR(16777215),
620 "ISSUE_CHANGE_CREATION_DATE" BIGINT
622 CREATE INDEX "ISSUE_CHANGES_KEE" ON "ISSUE_CHANGES" ("KEE");
623 CREATE INDEX "ISSUE_CHANGES_ISSUE_KEY" ON "ISSUE_CHANGES" ("ISSUE_KEY");
626 CREATE TABLE "PERMISSION_TEMPLATES" (
627 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
628 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
629 "NAME" VARCHAR(100) NOT NULL,
630 "KEE" VARCHAR(100) NOT NULL,
631 "DESCRIPTION" VARCHAR(4000),
632 "KEY_PATTERN" VARCHAR(500),
633 "CREATED_AT" TIMESTAMP,
634 "UPDATED_AT" TIMESTAMP
638 CREATE TABLE "PERM_TPL_CHARACTERISTICS" (
639 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
640 "TEMPLATE_ID" INTEGER NOT NULL,
641 "PERMISSION_KEY" VARCHAR(64) NOT NULL,
642 "WITH_PROJECT_CREATOR" BOOLEAN NOT NULL DEFAULT FALSE,
643 "CREATED_AT" BIGINT NOT NULL,
644 "UPDATED_AT" BIGINT NOT NULL
646 CREATE UNIQUE INDEX "UNIQ_PERM_TPL_CHARAC" ON "PERM_TPL_CHARACTERISTICS" ("TEMPLATE_ID", "PERMISSION_KEY");
649 CREATE TABLE "PERM_TEMPLATES_USERS" (
650 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
651 "USER_ID" INTEGER NOT NULL,
652 "TEMPLATE_ID" INTEGER NOT NULL,
653 "PERMISSION_REFERENCE" VARCHAR(64) NOT NULL,
654 "CREATED_AT" TIMESTAMP,
655 "UPDATED_AT" TIMESTAMP
659 CREATE TABLE "PERM_TEMPLATES_GROUPS" (
660 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
662 "TEMPLATE_ID" INTEGER NOT NULL,
663 "PERMISSION_REFERENCE" VARCHAR(64) NOT NULL,
664 "CREATED_AT" TIMESTAMP,
665 "UPDATED_AT" TIMESTAMP
669 CREATE TABLE "QPROFILE_CHANGES" (
670 "KEE" VARCHAR(40) NOT NULL,
671 "RULES_PROFILE_UUID" VARCHAR(255) NOT NULL,
672 "CHANGE_TYPE" VARCHAR(20) NOT NULL,
673 "CREATED_AT" BIGINT NOT NULL,
674 "USER_UUID" VARCHAR(255),
677 CONSTRAINT "PK_QPROFILE_CHANGES" PRIMARY KEY ("KEE")
679 CREATE INDEX "QP_CHANGES_RULES_PROFILE_UUID" ON "QPROFILE_CHANGES" ("RULES_PROFILE_UUID");
682 CREATE TABLE "FILE_SOURCES" (
683 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
684 "PROJECT_UUID" VARCHAR(50) NOT NULL,
685 "FILE_UUID" VARCHAR(50) NOT NULL,
687 "LINE_HASHES_VERSION" INTEGER,
688 "LINE_COUNT" INTEGER NOT NULL,
690 "DATA_HASH" VARCHAR(50),
691 "SRC_HASH" VARCHAR(50),
692 "REVISION" VARCHAR(100),
693 "CREATED_AT" BIGINT NOT NULL,
694 "UPDATED_AT" BIGINT NOT NULL
696 CREATE INDEX "FILE_SOURCES_PROJECT_UUID" ON "FILE_SOURCES" ("PROJECT_UUID");
697 CREATE UNIQUE INDEX "FILE_SOURCES_FILE_UUID" ON "FILE_SOURCES" ("FILE_UUID");
698 CREATE INDEX "FILE_SOURCES_UPDATED_AT" ON "FILE_SOURCES" ("UPDATED_AT");
701 CREATE TABLE "CE_QUEUE" (
702 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
703 "UUID" VARCHAR(40) NOT NULL,
704 "TASK_TYPE" VARCHAR(15) NOT NULL,
705 "COMPONENT_UUID" VARCHAR(40) NULL,
706 "MAIN_COMPONENT_UUID" VARCHAR(40) NULL,
707 "STATUS" VARCHAR(15) NOT NULL,
708 "SUBMITTER_UUID" VARCHAR(255) NULL,
709 "WORKER_UUID" VARCHAR(40) NULL,
710 "EXECUTION_COUNT" INTEGER NOT NULL,
711 "STARTED_AT" BIGINT NULL,
712 "CREATED_AT" BIGINT NOT NULL,
713 "UPDATED_AT" BIGINT NOT NULL
715 CREATE UNIQUE INDEX "CE_QUEUE_UUID" ON "CE_QUEUE" ("UUID");
716 CREATE INDEX "CE_QUEUE_COMPONENT" ON "CE_QUEUE" ("COMPONENT_UUID");
717 CREATE INDEX "CE_QUEUE_MAIN_COMPONENT" ON "CE_QUEUE" ("MAIN_COMPONENT_UUID");
718 CREATE INDEX "CE_QUEUE_STATUS" ON "CE_QUEUE" ("STATUS");
721 CREATE TABLE "CE_ACTIVITY" (
722 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
723 "UUID" VARCHAR(40) NOT NULL,
724 "TASK_TYPE" VARCHAR(15) NOT NULL,
725 "COMPONENT_UUID" VARCHAR(40) NULL,
726 "MAIN_COMPONENT_UUID" VARCHAR(40) NULL,
727 "ANALYSIS_UUID" VARCHAR(50) NULL,
728 "STATUS" VARCHAR(15) NOT NULL,
730 "IS_LAST_KEY" VARCHAR(55),
731 "MAIN_IS_LAST" BOOLEAN,
732 "MAIN_IS_LAST_KEY" VARCHAR(55),
733 "SUBMITTER_UUID" VARCHAR(255) NULL,
734 "WORKER_UUID" VARCHAR(40) NULL,
735 "EXECUTION_COUNT" INTEGER NOT NULL,
736 "SUBMITTED_AT" BIGINT NOT NULL,
737 "STARTED_AT" BIGINT NULL,
738 "EXECUTED_AT" BIGINT NULL,
739 "CREATED_AT" BIGINT NOT NULL,
740 "UPDATED_AT" BIGINT NOT NULL,
741 "EXECUTION_TIME_MS" BIGINT NULL,
742 "ERROR_MESSAGE" VARCHAR(1000),
743 "ERROR_STACKTRACE" CLOB,
744 "ERROR_TYPE" VARCHAR(20)
746 CREATE UNIQUE INDEX "CE_ACTIVITY_UUID" ON "CE_ACTIVITY" ("UUID");
747 CREATE INDEX "CE_ACTIVITY_COMPONENT" ON "CE_ACTIVITY" ("COMPONENT_UUID");
748 CREATE INDEX "CE_ACTIVITY_MAIN_COMPONENT" ON "CE_ACTIVITY" ("COMPONENT_UUID");
749 CREATE INDEX "CE_ACTIVITY_ISLAST_KEY" ON "CE_ACTIVITY" ("IS_LAST_KEY");
750 CREATE INDEX "CE_ACTIVITY_ISLAST" ON "CE_ACTIVITY" ("IS_LAST", "STATUS");
751 CREATE INDEX "CE_ACTIVITY_MAIN_ISLAST_KEY" ON "CE_ACTIVITY" ("MAIN_IS_LAST_KEY");
752 CREATE INDEX "CE_ACTIVITY_MAIN_ISLAST" ON "CE_ACTIVITY" ("MAIN_IS_LAST", "STATUS");
755 CREATE TABLE "CE_TASK_CHARACTERISTICS" (
756 "UUID" VARCHAR(40) NOT NULL,
757 "TASK_UUID" VARCHAR(40) NOT NULL,
758 "KEE" VARCHAR(50) NOT NULL,
759 "TEXT_VALUE" VARCHAR(4000),
761 CONSTRAINT "PK_CE_TASK_CHARACTERISTICS" PRIMARY KEY ("UUID")
763 CREATE INDEX "CE_TASK_CHARACTERISTICS_TASK_UUID" ON "CE_TASK_CHARACTERISTICS" ("TASK_UUID");
766 CREATE TABLE "CE_TASK_INPUT" (
767 "TASK_UUID" VARCHAR(40) NOT NULL,
769 "CREATED_AT" BIGINT NOT NULL,
770 "UPDATED_AT" BIGINT NOT NULL,
772 CONSTRAINT "PK_CE_TASK_INPUT" PRIMARY KEY ("TASK_UUID")
776 CREATE TABLE "CE_SCANNER_CONTEXT" (
777 "TASK_UUID" VARCHAR(40) NOT NULL,
778 "CONTEXT_DATA" BLOB NOT NULL,
779 "CREATED_AT" BIGINT NOT NULL,
780 "UPDATED_AT" BIGINT NOT NULL,
782 CONSTRAINT "PK_CE_SCANNER_CONTEXT" PRIMARY KEY ("TASK_UUID")
785 CREATE TABLE "CE_TASK_MESSAGE" (
786 "UUID" VARCHAR(40) NOT NULL,
787 "TASK_UUID" VARCHAR(40) NOT NULL,
788 "MESSAGE" VARCHAR(4000) NOT NULL,
789 "CREATED_AT" BIGINT NOT NULL,
791 CONSTRAINT "CE_TASK_MESSAGE" PRIMARY KEY ("UUID")
793 CREATE INDEX "CE_TASK_MESSAGE_TASK" ON "CE_TASK_MESSAGE" ("TASK_UUID");
796 CREATE TABLE "USER_TOKENS" (
797 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
798 "USER_UUID" VARCHAR(255) NOT NULL,
799 "NAME" VARCHAR(100) NOT NULL,
800 "TOKEN_HASH" VARCHAR(255) NOT NULL,
801 "LAST_CONNECTION_DATE" BIGINT,
802 "CREATED_AT" BIGINT NOT NULL
804 CREATE UNIQUE INDEX "USER_TOKENS_TOKEN_HASH" ON "USER_TOKENS" ("TOKEN_HASH");
805 CREATE UNIQUE INDEX "USER_TOKENS_USER_UUID_NAME" ON "USER_TOKENS" ("USER_UUID", "NAME");
808 CREATE TABLE "ES_QUEUE" (
809 "UUID" VARCHAR(40) NOT NULL,
810 "DOC_TYPE" VARCHAR(40) NOT NULL,
811 "DOC_ID" VARCHAR(4000) NOT NULL,
812 "DOC_ID_TYPE" VARCHAR(20),
813 "DOC_ROUTING" VARCHAR(4000),
814 "CREATED_AT" BIGINT NOT NULL,
816 CONSTRAINT "PK_ES_QUEUE" PRIMARY KEY ("UUID")
818 CREATE INDEX "ES_QUEUE_CREATED_AT" ON "ES_QUEUE" ("CREATED_AT");
821 CREATE TABLE "PLUGINS" (
822 "UUID" VARCHAR(40) NOT NULL,
823 "KEE" VARCHAR(200) NOT NULL,
824 "BASE_PLUGIN_KEY" VARCHAR(200),
825 "FILE_HASH" VARCHAR(200) NOT NULL,
826 "CREATED_AT" BIGINT NOT NULL,
827 "UPDATED_AT" BIGINT NOT NULL,
829 CONSTRAINT "PK_PLUGINS" PRIMARY KEY ("UUID")
831 CREATE UNIQUE INDEX "PLUGINS_KEY" ON "PLUGINS" ("KEE");
834 CREATE TABLE "PROJECT_BRANCHES" (
835 "UUID" VARCHAR(50) NOT NULL,
836 "PROJECT_UUID" VARCHAR(50) NOT NULL,
837 "KEE" VARCHAR(255) NOT NULL,
838 "KEY_TYPE" VARCHAR(12) NOT NULL,
839 "BRANCH_TYPE" VARCHAR(12),
840 "MERGE_BRANCH_UUID" VARCHAR(50),
841 "PULL_REQUEST_BINARY" BLOB,
842 "MANUAL_BASELINE_ANALYSIS_UUID" VARCHAR(40),
843 "CREATED_AT" BIGINT NOT NULL,
844 "UPDATED_AT" BIGINT NOT NULL,
846 CONSTRAINT "PK_PROJECT_BRANCHES" PRIMARY KEY ("UUID")
848 CREATE UNIQUE INDEX "PROJECT_BRANCHES_KEE_KEY_TYPE" ON "PROJECT_BRANCHES" ("PROJECT_UUID", "KEE", "KEY_TYPE");
851 CREATE TABLE "ANALYSIS_PROPERTIES" (
852 "UUID" VARCHAR(40) NOT NULL,
853 "SNAPSHOT_UUID" VARCHAR(40) NOT NULL,
854 "KEE" VARCHAR(512) NOT NULL,
855 "TEXT_VALUE" VARCHAR(4000),
857 "IS_EMPTY" BOOLEAN NOT NULL,
858 "CREATED_AT" BIGINT NOT NULL,
860 CONSTRAINT "PK_ANALYSIS_PROPERTIES" PRIMARY KEY ("UUID")
862 CREATE INDEX "SNAPSHOT_UUID" ON "ANALYSIS_PROPERTIES" ("SNAPSHOT_UUID");
864 CREATE TABLE "NEW_CODE_PERIODS" (
865 "UUID" VARCHAR(40) NOT NULL,
866 "PROJECT_UUID" VARCHAR(40),
867 "BRANCH_UUID" VARCHAR(40),
868 "TYPE" VARCHAR(30) NOT NULL,
870 "UPDATED_AT" BIGINT NOT NULL,
871 "CREATED_AT" BIGINT NOT NULL,
873 CONSTRAINT "PK_NEW_CODE_PERIOD" PRIMARY KEY ("UUID")
876 CREATE TABLE "WEBHOOKS" (
877 "UUID" VARCHAR(40) NOT NULL,
878 "NAME" VARCHAR(100) NOT NULL,
879 "URL" VARCHAR(2000) NOT NULL,
880 "ORGANIZATION_UUID" VARCHAR(40),
881 "PROJECT_UUID" VARCHAR(40),
882 "SECRET" VARCHAR(200),
883 "CREATED_AT" BIGINT NOT NULL,
884 "UPDATED_AT" BIGINT NOT NULL,
886 CONSTRAINT "PK_WEBHOOKS" PRIMARY KEY ("UUID")
888 CREATE INDEX "ORGANIZATION_WEBHOOK" ON "WEBHOOKS" ("ORGANIZATION_UUID");
889 CREATE INDEX "PROJECT_WEBHOOK" ON "WEBHOOKS" ("PROJECT_UUID");
892 CREATE TABLE "WEBHOOK_DELIVERIES" (
893 "UUID" VARCHAR(40) NOT NULL,
894 "WEBHOOK_UUID" VARCHAR(40) NOT NULL,
895 "COMPONENT_UUID" VARCHAR(40) NOT NULL,
896 "ANALYSIS_UUID" VARCHAR(40),
897 "CE_TASK_UUID" VARCHAR(40),
898 "NAME" VARCHAR(100) NOT NULL,
899 "URL" VARCHAR(2000) NOT NULL,
900 "SUCCESS" BOOLEAN NOT NULL,
902 "DURATION_MS" INT NOT NULL,
903 "PAYLOAD" CLOB NOT NULL,
904 "ERROR_STACKTRACE" CLOB,
905 "CREATED_AT" BIGINT NOT NULL,
907 CONSTRAINT "PK_WEBHOOK_DELIVERIES" PRIMARY KEY ("UUID")
909 CREATE INDEX "COMPONENT_UUID" ON "WEBHOOK_DELIVERIES" ("COMPONENT_UUID");
910 CREATE INDEX "CE_TASK_UUID" ON "WEBHOOK_DELIVERIES" ("CE_TASK_UUID");
911 CREATE INDEX "ANALYSIS_UUID" ON "WEBHOOK_DELIVERIES" ("ANALYSIS_UUID");
914 CREATE TABLE "ALM_APP_INSTALLS" (
915 "UUID" VARCHAR(40) NOT NULL,
916 "ALM_ID" VARCHAR(40) NOT NULL,
917 "OWNER_ID" VARCHAR(4000) NOT NULL,
918 "IS_OWNER_USER" BOOLEAN NOT NULL,
919 "INSTALL_ID" VARCHAR(4000) NOT NULL,
920 "USER_EXTERNAL_ID" VARCHAR(255),
921 "CREATED_AT" BIGINT NOT NULL,
922 "UPDATED_AT" BIGINT NOT NULL,
924 CONSTRAINT "PK_ALM_APP_INSTALLS" PRIMARY KEY ("UUID")
926 CREATE UNIQUE INDEX "ALM_APP_INSTALLS_OWNER" ON "ALM_APP_INSTALLS" ("ALM_ID", "OWNER_ID");
927 CREATE UNIQUE INDEX "ALM_APP_INSTALLS_INSTALL" ON "ALM_APP_INSTALLS" ("ALM_ID", "INSTALL_ID");
928 CREATE INDEX "ALM_APP_INSTALLS_EXTERNAL_ID" ON "ALM_APP_INSTALLS" ("USER_EXTERNAL_ID");
930 CREATE TABLE "PROJECT_ALM_BINDINGS" (
931 "UUID" VARCHAR(40) NOT NULL,
932 "ALM_ID" VARCHAR(40) NOT NULL,
933 "REPO_ID" VARCHAR(256) NOT NULL,
934 "PROJECT_UUID" VARCHAR(40) NOT NULL,
935 "GITHUB_SLUG" VARCHAR(256) NULL,
936 "URL" VARCHAR(2000) NOT NULL,
937 "CREATED_AT" BIGINT NOT NULL,
938 "UPDATED_AT" BIGINT NOT NULL,
939 CONSTRAINT "PK_PROJECT_ALM_BINDINGS" PRIMARY KEY ("UUID")
941 CREATE UNIQUE INDEX "PROJECT_ALM_BINDINGS_ALM_REPO" ON "PROJECT_ALM_BINDINGS" ("ALM_ID", "REPO_ID");
942 CREATE UNIQUE INDEX "PROJECT_ALM_BINDINGS_PROJECT" ON "PROJECT_ALM_BINDINGS" ("PROJECT_UUID");
944 CREATE TABLE "PROJECT_MAPPINGS" (
945 "UUID" VARCHAR(40) NOT NULL,
946 "KEY_TYPE" VARCHAR(200) NOT NULL,
947 "KEE" VARCHAR(4000) NOT NULL,
948 "PROJECT_UUID" VARCHAR(40) NOT NULL,
949 "CREATED_AT" BIGINT NOT NULL,
950 CONSTRAINT "PK_PROJECT_MAPPINGS" PRIMARY KEY ("UUID")
952 CREATE UNIQUE INDEX "KEY_TYPE_KEE" ON "PROJECT_MAPPINGS" ("KEY_TYPE", "KEE");
953 CREATE INDEX "PROJECT_UUID" ON "PROJECT_MAPPINGS" ("PROJECT_UUID");
955 CREATE TABLE "ORGANIZATION_ALM_BINDINGS" (
956 "UUID" VARCHAR(40) NOT NULL,
957 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
958 "ALM_APP_INSTALL_UUID" VARCHAR(40) NOT NULL,
959 "ALM_ID" VARCHAR(40) NOT NULL,
960 "URL" VARCHAR(2000) NOT NULL,
961 "USER_UUID" VARCHAR(255) NOT NULL,
962 "MEMBERS_SYNC_ENABLED" BOOLEAN,
963 "CREATED_AT" BIGINT NOT NULL,
964 CONSTRAINT "PK_ORGANIZATION_ALM_BINDINGS" PRIMARY KEY ("UUID")
966 CREATE UNIQUE INDEX "ORG_ALM_BINDINGS_ORG" ON "ORGANIZATION_ALM_BINDINGS" ("ORGANIZATION_UUID");
967 CREATE UNIQUE INDEX "ORG_ALM_BINDINGS_INSTALL" ON "ORGANIZATION_ALM_BINDINGS" ("ALM_APP_INSTALL_UUID");
969 CREATE TABLE "USER_PROPERTIES" (
970 "UUID" VARCHAR(40) NOT NULL,
971 "USER_UUID" VARCHAR(255) NOT NULL,
972 "KEE" VARCHAR(100) NOT NULL,
973 "TEXT_VALUE" VARCHAR(4000) NOT NULL,
974 "CREATED_AT" BIGINT NOT NULL,
975 "UPDATED_AT" BIGINT NOT NULL,
977 CONSTRAINT "PK_USER_PROPERTIES" PRIMARY KEY ("UUID")
979 CREATE UNIQUE INDEX "USER_PROPERTIES_USER_UUID_KEE" ON "USER_PROPERTIES" ("USER_UUID", "KEE");