Skip to content

Commit

Permalink
Merge pull request mvnpm#9420 from ia3andy/index
Browse files Browse the repository at this point in the history
Add CentralSyncItem index
  • Loading branch information
phillip-kruger authored Oct 2, 2024
2 parents 74cd3ab + a54dab6 commit 0aa3325
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/io/mvnpm/mavencentral/sync/CentralSyncItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Index;
import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;

import io.quarkus.hibernate.orm.panache.PanacheEntityBase;

@Entity
@IdClass(Gav.class)
@Table(indexes = {
@Index(columnList = "stage, stageChangeTime DESC")
})
@NamedQueries({
@NamedQuery(name = "CentralSyncItem.findByStage", query = "from CentralSyncItem where stage = ?1 order by stageChangeTime DESC LIMIT 999"),
@NamedQuery(name = "CentralSyncItem.findUploadedButNotReleased", query = "from CentralSyncItem where stage IN ?1 order by stageChangeTime DESC")
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ quarkus.mailer.mock=true
%prod.quarkus.datasource.password=mvnpm
%prod.quarkus.datasource.username=mvnpm

%prod.quarkus.hibernate-orm.database.generation=update

%dev.quarkus.hibernate-orm.database.generation=drop-and-create
%test.quarkus.hibernate-orm.database.generation=drop-and-create

Expand Down

0 comments on commit 0aa3325

Please sign in to comment.