Added an unique constraint for the round_number of a bidding round to prevent multiple rounds with the same round number.

This commit is contained in:
2026-02-12 12:08:13 +01:00
parent e01042130e
commit 04c79d341c

View File

@ -16,5 +16,6 @@ defmodule BeetRoundServer.BiddingRounds.BiddingRound do
bidding_round
|> cast(attrs, [:round_number, :stopped])
|> validate_required([:round_number, :stopped])
|> unique_constraint(:round_number)
end
end