1 CREATE TABLE "PROJECTS" (
2 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
3 "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
5 "UUID" VARCHAR(50) NOT NULL,
6 "UUID_PATH" VARCHAR(1500) NOT NULL,
7 "ROOT_UUID" VARCHAR(50) NOT NULL,
8 "PROJECT_UUID" VARCHAR(50) NOT NULL,
9 "MODULE_UUID" VARCHAR(50),
10 "MODULE_UUID_PATH" VARCHAR(1500),
11 "MAIN_BRANCH_PROJECT_UUID" VARCHAR(50),
13 "DESCRIPTION" VARCHAR(2000),
14 "PRIVATE" BOOLEAN NOT NULL,
16 "ENABLED" BOOLEAN NOT NULL DEFAULT TRUE,
18 "QUALIFIER" VARCHAR(10),
19 "DEPRECATED_KEE" VARCHAR(400),
21 "LANGUAGE" VARCHAR(20),
22 "COPY_COMPONENT_UUID" VARCHAR(50),
23 "LONG_NAME" VARCHAR(2000),
24 "DEVELOPER_UUID" VARCHAR(50),
25 "CREATED_AT" TIMESTAMP,
26 "AUTHORIZATION_UPDATED_AT" BIGINT,
28 "B_COPY_COMPONENT_UUID" VARCHAR(50),
29 "B_DESCRIPTION" VARCHAR(2000),
31 "B_UUID_PATH" VARCHAR(1500),
32 "B_LANGUAGE" VARCHAR(20),
33 "B_LONG_NAME" VARCHAR(500),
34 "B_MODULE_UUID" VARCHAR(50),
35 "B_MODULE_UUID_PATH" VARCHAR(1500),
36 "B_NAME" VARCHAR(500),
37 "B_PATH" VARCHAR(2000),
38 "B_QUALIFIER" VARCHAR(10)
40 CREATE INDEX "PROJECTS_ORGANIZATION" ON "PROJECTS" ("ORGANIZATION_UUID");
41 CREATE UNIQUE INDEX "PROJECTS_KEE" ON "PROJECTS" ("KEE");
42 CREATE INDEX "PROJECTS_ROOT_UUID" ON "PROJECTS" ("ROOT_UUID");
43 CREATE UNIQUE INDEX "PROJECTS_UUID" ON "PROJECTS" ("UUID");
44 CREATE INDEX "PROJECTS_PROJECT_UUID" ON "PROJECTS" ("PROJECT_UUID");
45 CREATE INDEX "PROJECTS_MODULE_UUID" ON "PROJECTS" ("MODULE_UUID");
46 CREATE INDEX "PROJECTS_QUALIFIER" ON "PROJECTS" ("QUALIFIER");
48 CREATE TABLE "SNAPSHOTS" (
49 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
50 "UUID" VARCHAR(50) NOT NULL,
53 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
54 "STATUS" VARCHAR(4) NOT NULL DEFAULT 'U',
55 "PURGE_STATUS" INTEGER,
56 "ISLAST" BOOLEAN NOT NULL DEFAULT FALSE,
57 "VERSION" VARCHAR(500),
58 "PERIOD1_MODE" VARCHAR(100),
59 "PERIOD1_PARAM" VARCHAR(100),
60 "PERIOD1_DATE" BIGINT,
61 "PERIOD2_MODE" VARCHAR(100),
62 "PERIOD2_PARAM" VARCHAR(100),
63 "PERIOD2_DATE" BIGINT,
64 "PERIOD3_MODE" VARCHAR(100),
65 "PERIOD3_PARAM" VARCHAR(100),
66 "PERIOD3_DATE" BIGINT,
67 "PERIOD4_MODE" VARCHAR(100),
68 "PERIOD4_PARAM" VARCHAR(100),
69 "PERIOD4_DATE" BIGINT,
70 "PERIOD5_MODE" VARCHAR(100),
71 "PERIOD5_PARAM" VARCHAR(100),
74 CREATE INDEX "SNAPSHOT_COMPONENT" ON "SNAPSHOTS" ("COMPONENT_UUID");
75 CREATE UNIQUE INDEX "ANALYSES_UUID" ON "SNAPSHOTS" ("UUID");
78 CREATE TABLE "LIVE_MEASURES" (
79 "UUID" VARCHAR(40) NOT NULL PRIMARY KEY,
80 "PROJECT_UUID" VARCHAR(50) NOT NULL,
81 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
82 "METRIC_ID" INTEGER NOT NULL,
84 "TEXT_VALUE" VARCHAR(4000),
86 "MEASURE_DATA" BINARY,
87 "UPDATE_MARKER" VARCHAR(40),
88 "CREATED_AT" BIGINT NOT NULL,
89 "UPDATED_AT" BIGINT NOT NULL
91 CREATE INDEX "LIVE_MEASURES_PROJECT" ON "LIVE_MEASURES" ("PROJECT_UUID");
92 CREATE UNIQUE INDEX "LIVE_MEASURES_COMPONENT" ON "LIVE_MEASURES" ("COMPONENT_UUID", "METRIC_ID");
95 CREATE TABLE "PROJECT_MEASURES" (
96 "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
98 "METRIC_ID" INTEGER NOT NULL,
99 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
100 "ANALYSIS_UUID" VARCHAR(50) NOT NULL,
101 "TEXT_VALUE" VARCHAR(4000),
102 "ALERT_STATUS" VARCHAR(5),
103 "ALERT_TEXT" VARCHAR(4000),
104 "DESCRIPTION" VARCHAR(4000),
106 "VARIATION_VALUE_1" DOUBLE,
107 "VARIATION_VALUE_2" DOUBLE,
108 "VARIATION_VALUE_3" DOUBLE,
109 "VARIATION_VALUE_4" DOUBLE,
110 "VARIATION_VALUE_5" DOUBLE,
111 "MEASURE_DATA" BINARY
113 CREATE INDEX "MEASURES_COMPONENT_UUID" ON "PROJECT_MEASURES" ("COMPONENT_UUID");
114 CREATE INDEX "MEASURES_ANALYSIS_METRIC" ON "PROJECT_MEASURES" ("ANALYSIS_UUID", "METRIC_ID");
115 CREATE INDEX "MEASURES_PERSON" ON "PROJECT_MEASURES" ("PERSON_ID");