Skip to content

Commit

Permalink
Add missing uniqueness constraints to LeagueSeasonMembership and Leag…
Browse files Browse the repository at this point in the history
…ueGameSubmission
  • Loading branch information
timoschwarzer committed Aug 8, 2024
1 parent eeb57a2 commit 4cd1b14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ object LeagueGameSubmissions : LongIdTable("league_game_submissions") {
val rankingMultiplier = float("rankingMultiplier").default(1.0f)
val validated = bool("validated").default(false)
val autoValidationErrors = text("auto_validation_error").nullable()

init {
uniqueIndex(gameId, membershipId)
}
}

class LeagueGameSubmission(id: EntityID<Long>) : LongEntity(id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ object LeagueSeasonMemberships : LongIdTable("league_season_memberships") {
val rankingCompensationPoints = integer("discard_compensation_points").default(0)
val rank = integer("rank").nullable()
val lastRankDelta = integer("last_rank_delta").nullable()

init {
uniqueIndex(userId, seasonId)
}
}

class LeagueSeasonMembership(id: EntityID<Long>) : LongEntity(id) {
Expand Down

0 comments on commit 4cd1b14

Please sign in to comment.