diff options
author | Belen Pruvost <belen.pruvost@sonarsource.com> | 2021-07-14 17:15:32 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-07-27 20:03:02 +0000 |
commit | 09d8569209aade0e3b4cbd21c6dee9da025b245b (patch) | |
tree | 938e184ebc8296a3ae821d7225ba3fff82375e75 /server/sonar-db-dao/src/schema | |
parent | 1627d31954c6fcbcbad8bd4045285df8e97cc96b (diff) | |
download | sonarqube-09d8569209aade0e3b4cbd21c6dee9da025b245b.tar.gz sonarqube-09d8569209aade0e3b4cbd21c6dee9da025b245b.zip |
SONAR-15142 Persisting audits for User operations
Diffstat (limited to 'server/sonar-db-dao/src/schema')
-rw-r--r-- | server/sonar-db-dao/src/schema/schema-sq.ddl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl index 03dd4fd18ce..a2f2267a9bd 100644 --- a/server/sonar-db-dao/src/schema/schema-sq.ddl +++ b/server/sonar-db-dao/src/schema/schema-sq.ddl @@ -100,6 +100,18 @@ CREATE UNIQUE INDEX "UNIQ_APP_PROJECTS" ON "APP_PROJECTS"("APPLICATION_UUID", "P CREATE INDEX "IDX_APP_PROJ_APPLICATION_UUID" ON "APP_PROJECTS"("APPLICATION_UUID"); CREATE INDEX "IDX_APP_PROJ_PROJECT_UUID" ON "APP_PROJECTS"("PROJECT_UUID"); +CREATE TABLE "AUDITS"( + "UUID" VARCHAR(40) NOT NULL, + "USER_UUID" VARCHAR(40) NOT NULL, + "USER_LOGIN" VARCHAR(255) NOT NULL, + "CATEGORY" VARCHAR(20) NOT NULL, + "OPERATION" VARCHAR(50) NOT NULL, + "NEW_VALUE" VARCHAR(4000), + "CREATED_AT" BIGINT NOT NULL +); +ALTER TABLE "AUDITS" ADD CONSTRAINT "PK_AUDITS" PRIMARY KEY("UUID"); +CREATE INDEX "AUDITS_CREATED_AT" ON "AUDITS"("CREATED_AT"); + CREATE TABLE "CE_ACTIVITY"( "UUID" VARCHAR(40) NOT NULL, "TASK_TYPE" VARCHAR(15) NOT NULL, |