]> source.dussan.org Git - sonarqube.git/blob
a2da6523742aeb9cda39692e808b90700c862390
[sonarqube.git] /
1 CREATE TABLE "RULES"(
2     "ID" INTEGER NOT NULL AUTO_INCREMENT (1,1),
3     "NAME" VARCHAR(200),
4     "PLUGIN_RULE_KEY" VARCHAR(200) NOT NULL,
5     "PLUGIN_KEY" VARCHAR(200),
6     "PLUGIN_CONFIG_KEY" VARCHAR(200),
7     "PLUGIN_NAME" VARCHAR(255) NOT NULL,
8     "SCOPE" VARCHAR(20) NOT NULL,
9     "DESCRIPTION" CLOB(2147483647),
10     "PRIORITY" INTEGER,
11     "STATUS" VARCHAR(40),
12     "LANGUAGE" VARCHAR(20),
13     "DEF_REMEDIATION_FUNCTION" VARCHAR(20),
14     "DEF_REMEDIATION_GAP_MULT" VARCHAR(20),
15     "DEF_REMEDIATION_BASE_EFFORT" VARCHAR(20),
16     "GAP_DESCRIPTION" VARCHAR(4000),
17     "SYSTEM_TAGS" VARCHAR(4000),
18     "IS_TEMPLATE" BOOLEAN DEFAULT FALSE NOT NULL,
19     "DESCRIPTION_FORMAT" VARCHAR(20),
20     "RULE_TYPE" TINYINT,
21     "SECURITY_STANDARDS" VARCHAR(4000),
22     "IS_AD_HOC" BOOLEAN NOT NULL,
23     "IS_EXTERNAL" BOOLEAN NOT NULL,
24     "CREATED_AT" BIGINT,
25     "UPDATED_AT" BIGINT,
26     "UUID" VARCHAR(40) NOT NULL,
27     "TEMPLATE_UUID" VARCHAR(40)
28 );
29 ALTER TABLE "RULES" ADD CONSTRAINT "PK_RULES" PRIMARY KEY("ID");
30 CREATE UNIQUE INDEX "RULES_REPO_KEY" ON "RULES"("PLUGIN_RULE_KEY", "PLUGIN_NAME");
31
32 CREATE TABLE "ISSUES"(
33     "KEE" VARCHAR(50) NOT NULL,
34     "RULE_ID" INTEGER,
35     "SEVERITY" VARCHAR(10),
36     "MANUAL_SEVERITY" BOOLEAN NOT NULL,
37     "MESSAGE" VARCHAR(4000),
38     "LINE" INTEGER,
39     "GAP" DOUBLE,
40     "STATUS" VARCHAR(20),
41     "RESOLUTION" VARCHAR(20),
42     "CHECKSUM" VARCHAR(1000),
43     "REPORTER" VARCHAR(255),
44     "ASSIGNEE" VARCHAR(255),
45     "AUTHOR_LOGIN" VARCHAR(255),
46     "ACTION_PLAN_KEY" VARCHAR(50),
47     "ISSUE_ATTRIBUTES" VARCHAR(4000),
48     "EFFORT" INTEGER,
49     "CREATED_AT" BIGINT,
50     "UPDATED_AT" BIGINT,
51     "ISSUE_CREATION_DATE" BIGINT,
52     "ISSUE_UPDATE_DATE" BIGINT,
53     "ISSUE_CLOSE_DATE" BIGINT,
54     "TAGS" VARCHAR(4000),
55     "COMPONENT_UUID" VARCHAR(50),
56     "PROJECT_UUID" VARCHAR(50),
57     "LOCATIONS" BLOB,
58     "ISSUE_TYPE" TINYINT,
59     "FROM_HOTSPOT" BOOLEAN,
60     "RULE_UUID" VARCHAR(40)
61 );
62 ALTER TABLE "ISSUES" ADD CONSTRAINT "PK_ISSUES" PRIMARY KEY("KEE");
63 CREATE INDEX "ISSUES_ASSIGNEE" ON "ISSUES"("ASSIGNEE");
64 CREATE INDEX "ISSUES_COMPONENT_UUID" ON "ISSUES"("COMPONENT_UUID");
65 CREATE INDEX "ISSUES_CREATION_DATE" ON "ISSUES"("ISSUE_CREATION_DATE");
66 CREATE UNIQUE INDEX "ISSUES_KEE" ON "ISSUES"("KEE");
67 CREATE INDEX "ISSUES_PROJECT_UUID" ON "ISSUES"("PROJECT_UUID");
68 CREATE INDEX "ISSUES_RESOLUTION" ON "ISSUES"("RESOLUTION");
69 CREATE INDEX "ISSUES_RULE_UUID" ON "ISSUES"("RULE_UUID");
70 CREATE INDEX "ISSUES_UPDATED_AT" ON "ISSUES"("UPDATED_AT");