From 84424ec255c671e45acb788cc107ecf8f87f460b Mon Sep 17 00:00:00 2001 From: Jorden_Reuter Date: Fri, 27 Sep 2024 09:07:22 +0200 Subject: [PATCH] feat: added db index --- .../onecx/bookmark/domain/models/Bookmark.java | 3 ++- src/main/resources/db/changeLog.xml | 1 + .../resources/db/v1/2024-09-27-add-index.xml | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/db/v1/2024-09-27-add-index.xml diff --git a/src/main/java/org/tkit/onecx/bookmark/domain/models/Bookmark.java b/src/main/java/org/tkit/onecx/bookmark/domain/models/Bookmark.java index 072abd2..e09a16a 100644 --- a/src/main/java/org/tkit/onecx/bookmark/domain/models/Bookmark.java +++ b/src/main/java/org/tkit/onecx/bookmark/domain/models/Bookmark.java @@ -16,7 +16,8 @@ @Getter @Setter @Entity -@Table(name = "BOOKMARK") +@Table(name = "BOOKMARK", indexes = { + @Index(name = "IDX_USER_WORKSPACE_PRODUCT_APP", columnList = "USER_ID, WORKSPACE_NAME, PRODUCT_NAME, APP_ID") }) @SuppressWarnings("java:S2160") public class Bookmark extends TraceableEntity { diff --git a/src/main/resources/db/changeLog.xml b/src/main/resources/db/changeLog.xml index 1cb964f..cc53dd3 100644 --- a/src/main/resources/db/changeLog.xml +++ b/src/main/resources/db/changeLog.xml @@ -5,4 +5,5 @@ + \ No newline at end of file diff --git a/src/main/resources/db/v1/2024-09-27-add-index.xml b/src/main/resources/db/v1/2024-09-27-add-index.xml new file mode 100644 index 0000000..9b0b830 --- /dev/null +++ b/src/main/resources/db/v1/2024-09-27-add-index.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + +