1 CREATE TABLE "PROJECT_BRANCHES" (
2 "UUID" VARCHAR(50) NOT NULL,
3 "PROJECT_UUID" VARCHAR(50) NOT NULL,
4 "KEE" VARCHAR(255) NOT NULL,
5 "KEY_TYPE" VARCHAR(12) NOT NULL,
6 "BRANCH_TYPE" VARCHAR(12),
7 "MERGE_BRANCH_UUID" VARCHAR(50),
8 "PULL_REQUEST_BINARY" BLOB,
9 "MANUAL_BASELINE_ANALYSIS_UUID" VARCHAR(40),
10 "CREATED_AT" BIGINT NOT NULL,
11 "UPDATED_AT" BIGINT NOT NULL,
13 CONSTRAINT "PK_PROJECT_BRANCHES" PRIMARY KEY ("UUID")
15 CREATE UNIQUE INDEX "PROJECT_BRANCHES_KEE_KEY_TYPE" ON "PROJECT_BRANCHES" ("PROJECT_UUID", "KEE", "KEY_TYPE");
17 CREATE TABLE "NEW_CODE_PERIODS" (
18 "UUID" VARCHAR(40) NOT NULL,
19 "PROJECT_UUID" VARCHAR(40),
20 "BRANCH_UUID" VARCHAR(40),
21 "TYPE" VARCHAR(30) NOT NULL,
23 "UPDATED_AT" BIGINT NOT NULL,
24 "CREATED_AT" BIGINT NOT NULL,
26 CONSTRAINT "PK_NEW_CODE_PERIOD" PRIMARY KEY ("UUID")
29 CREATE TABLE "PROPERTIES" (
30 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
31 "PROP_KEY" VARCHAR(512) NOT NULL,
32 "RESOURCE_ID" INTEGER,
34 "IS_EMPTY" BOOLEAN NOT NULL,
35 "TEXT_VALUE" VARCHAR(4000),
39 CREATE INDEX "PROPERTIES_KEY" ON "PROPERTIES" ("PROP_KEY");
41 CREATE TABLE "PROJECTS" (
42 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
44 "UUID" VARCHAR(50) NOT NULL,
45 "ROOT_UUID" VARCHAR(50),
46 "PROJECT_UUID" VARCHAR(50) NOT NULL,
47 "MODULE_UUID" VARCHAR(50),
48 "MODULE_UUID_PATH" VARCHAR(1500),
49 "MAIN_BRANCH_PROJECT_UUID" VARCHAR(50),
52 "ENABLED" BOOLEAN NOT NULL DEFAULT TRUE,
54 "QUALIFIER" VARCHAR(10)
56 CREATE UNIQUE INDEX "PROJECTS_KEE" ON "PROJECTS" ("KEE");
57 CREATE INDEX "PROJECTS_ROOT_UUID" ON "PROJECTS" ("ROOT_UUID");
58 CREATE UNIQUE INDEX "PROJECTS_UUID" ON "PROJECTS" ("UUID");
59 CREATE INDEX "PROJECTS_PROJECT_UUID" ON "PROJECTS" ("PROJECT_UUID");
60 CREATE INDEX "PROJECTS_MODULE_UUID" ON "PROJECTS" ("MODULE_UUID");
61 CREATE INDEX "PROJECTS_QUALIFIER" ON "PROJECTS" ("QUALIFIER");
63 CREATE TABLE "EVENTS" (
64 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
66 "ANALYSIS_UUID" VARCHAR(50) NOT NULL,
67 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
68 "CATEGORY" VARCHAR(50),
69 "CREATED_AT" BIGINT NOT NULL,
70 "DESCRIPTION" VARCHAR(4000),
71 "EVENT_DATA" VARCHAR(4000)
73 CREATE INDEX "EVENTS_ANALYSIS" ON "EVENTS" ("ANALYSIS_UUID");
74 CREATE INDEX "EVENTS_COMPONENT_UUID" ON "EVENTS" ("COMPONENT_UUID");
76 CREATE TABLE "SNAPSHOTS" (
77 "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
78 "UUID" VARCHAR(50) NOT NULL,
81 "COMPONENT_UUID" VARCHAR(50) NOT NULL,
82 "STATUS" VARCHAR(4) NOT NULL DEFAULT 'U',
83 "ISLAST" BOOLEAN NOT NULL DEFAULT FALSE
85 CREATE INDEX "SNAPSHOT_COMPONENT" ON "SNAPSHOTS" ("COMPONENT_UUID");
86 CREATE UNIQUE INDEX "ANALYSES_UUID" ON "SNAPSHOTS" ("UUID");