Skip to content

Commit

Permalink
chore: Add column default to the managed field also in code (#2766)
Browse files Browse the repository at this point in the history
  • Loading branch information
StaNov authored Dec 10, 2024
1 parent 624e44a commit cb10b58
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import jakarta.persistence.OneToOne
import jakarta.persistence.Table
import jakarta.persistence.UniqueConstraint
import jakarta.validation.constraints.NotNull
import org.hibernate.annotations.ColumnDefault

@Entity
@Table(
Expand Down Expand Up @@ -40,6 +41,7 @@ class OrganizationRole(

// Unique constraint manually created in the schema:
// - Only one role where managed is true per user
@ColumnDefault("false")
var managed: Boolean = false

@ManyToOne
Expand Down

0 comments on commit cb10b58

Please sign in to comment.