Skip to content

Commit

Permalink
fix: add indices in hibernate
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteenke committed Jul 24, 2024
1 parent 5079420 commit b9f075c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

import java.time.LocalDateTime;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.Table;
import jakarta.persistence.*;

import org.hibernate.annotations.TenantId;
import org.tkit.quarkus.jpa.models.TraceableEntity;
Expand All @@ -16,7 +12,11 @@
@Getter
@Setter
@Entity
@Table(name = "announcement")
@Table(name = "announcement", indexes = {
@Index(name = "start_status_idx", columnList = "startDate, status, TENANT_ID"),
@Index(name = "product_idx", columnList = "PRODUCT_NAME, TENANT_ID"),
@Index(name = "workspace_idx", columnList = "workspaceName, TENANT_ID")
})
@SuppressWarnings("java:S2160")
public class Announcement extends TraceableEntity {

Expand Down

0 comments on commit b9f075c

Please sign in to comment.