Ensure uniqueness of scrobble rules

This commit is contained in:
Claudio Ortolina
2026-02-02 10:32:32 +00:00
parent 76f6791a45
commit faf8500256
3 changed files with 20 additions and 0 deletions
@@ -0,0 +1,8 @@
defmodule MusicLibrary.Repo.Migrations.AddScrobbleRulesConstraints do
use Ecto.Migration
def change do
drop index(:scrobble_rules, [:type, :match_value])
create unique_index(:scrobble_rules, [:type, :match_value], unique: true)
end
end