diff --git a/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Bommel.java b/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Bommel.java index 7f9b3f32..b13fd81b 100644 --- a/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Bommel.java +++ b/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Bommel.java @@ -3,7 +3,15 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import io.quarkus.hibernate.orm.panache.PanacheEntity; -import jakarta.persistence.*; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Index; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import java.util.Objects; import java.util.Set; @@ -43,7 +51,6 @@ with children_query as ( join children_query c on n.id = c.bommel where n.id != :startId or cycleMark = true """) -@SequenceGenerator(name = "Bommel_SEQ", allocationSize = 1) public class Bommel extends PanacheEntity { public static final String DEFAULT_ROOT_BOMMEL_EMOJI = "\uD83C\uDF33"; // tree diff --git a/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Member.java b/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Member.java index 1e2c52d7..4b790785 100644 --- a/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Member.java +++ b/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Member.java @@ -2,7 +2,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import io.quarkus.hibernate.orm.panache.PanacheEntity; -import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; import jakarta.validation.constraints.Email; import jakarta.validation.constraints.NotBlank; @@ -10,7 +13,6 @@ import java.util.Collection; @Entity -@SequenceGenerator(name = "Member_SEQ", allocationSize = 1) public class Member extends PanacheEntity { // TODO: Add OneToMany to Bommel here and test it diff --git a/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Organization.java b/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Organization.java index 46a47573..4e88d752 100644 --- a/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Organization.java +++ b/backend/app.hopps.org/src/main/java/app/hopps/org/jpa/Organization.java @@ -1,7 +1,11 @@ package app.hopps.org.jpa; import io.quarkus.hibernate.orm.panache.PanacheEntity; -import jakarta.persistence.*; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.OneToOne; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Pattern; @@ -11,7 +15,6 @@ import java.util.Set; @Entity -@SequenceGenerator(name = "Organization_SEQ", allocationSize = 1) public class Organization extends PanacheEntity { @NotBlank diff --git a/backend/app.hopps.org/src/main/resources/db/migration/V1.0.1__alter_sequences.sql b/backend/app.hopps.org/src/main/resources/db/migration/V1.0.1__alter_sequences.sql deleted file mode 100644 index c0f16584..00000000 --- a/backend/app.hopps.org/src/main/resources/db/migration/V1.0.1__alter_sequences.sql +++ /dev/null @@ -1,4 +0,0 @@ -alter sequence Bommel_SEQ INCREMENT BY 1; -alter sequence Member_SEQ INCREMENT BY 1; -alter sequence Organization_SEQ INCREMENT BY 1; -