aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src/schema/schema-sq.ddl
diff options
context:
space:
mode:
authorDejan Milisavljevic <dejan.milisavljevic@sonarsource.com>2024-12-16 16:21:15 +0100
committersonartech <sonartech@sonarsource.com>2024-12-20 20:03:11 +0000
commite1181094ddb77f6e596615d031e3dc93425443ba (patch)
treed292bcff77ad2fb33bc720465a86ba871c02dfd7 /server/sonar-db-dao/src/schema/schema-sq.ddl
parent3ce1c4cb8763cd283dbcb99e2f89c2d993b76a2e (diff)
downloadsonarqube-e1181094ddb77f6e596615d031e3dc93425443ba.tar.gz
sonarqube-e1181094ddb77f6e596615d031e3dc93425443ba.zip
SONAR-23978 Create table 'user_ai_tool_usages' and add column 'detected_ai_code' to table 'projects'
Diffstat (limited to 'server/sonar-db-dao/src/schema/schema-sq.ddl')
-rw-r--r--server/sonar-db-dao/src/schema/schema-sq.ddl11
1 files changed, 10 insertions, 1 deletions
diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl
index fa3ca75b1e9..27ecbc766e6 100644
--- a/server/sonar-db-dao/src/schema/schema-sq.ddl
+++ b/server/sonar-db-dao/src/schema/schema-sq.ddl
@@ -800,7 +800,8 @@ CREATE TABLE "PROJECTS"(
"NCLOC" BIGINT,
"CREATION_METHOD" CHARACTER VARYING(50) NOT NULL,
"CONTAINS_AI_CODE" BOOLEAN DEFAULT FALSE NOT NULL,
- "AI_CODE_FIX_ENABLED" BOOLEAN DEFAULT FALSE NOT NULL
+ "AI_CODE_FIX_ENABLED" BOOLEAN DEFAULT FALSE NOT NULL,
+ "DETECTED_AI_CODE" BOOLEAN DEFAULT FALSE NOT NULL
);
ALTER TABLE "PROJECTS" ADD CONSTRAINT "PK_NEW_PROJECTS" PRIMARY KEY("UUID");
CREATE UNIQUE NULLS NOT DISTINCT INDEX "UNIQ_PROJECTS_KEE" ON "PROJECTS"("KEE" NULLS FIRST);
@@ -1108,6 +1109,14 @@ CREATE TABLE "TELEMETRY_METRICS_SENT"(
);
ALTER TABLE "TELEMETRY_METRICS_SENT" ADD CONSTRAINT "PK_TELEMETRY_METRICS_SENT" PRIMARY KEY("METRIC_KEY", "DIMENSION");
+CREATE TABLE "USER_AI_TOOL_USAGES"(
+ "UUID" CHARACTER VARYING(40) NOT NULL,
+ "USER_UUID" CHARACTER VARYING(40) NOT NULL,
+ "ACTIVATED_AT" BIGINT NOT NULL,
+ "LAST_ACTIVITY_AT" BIGINT
+);
+ALTER TABLE "USER_AI_TOOL_USAGES" ADD CONSTRAINT "PK_USER_AI_TOOL_USAGES" PRIMARY KEY("UUID");
+
CREATE TABLE "USER_DISMISSED_MESSAGES"(
"UUID" CHARACTER VARYING(40) NOT NULL,
"USER_UUID" CHARACTER VARYING(255) NOT NULL,