Put unique index on participants urls

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-07-30 17:23:03 +02:00
parent ecf7bb1fef
commit 042d09b8cb
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -0,0 +1,11 @@
defmodule Mobilizon.Storage.Repo.Migrations.PutUniqueIndexOnParticipantsUrls do
use Ecto.Migration
def up do
create_if_not_exists(unique_index("participants", [:url]))
end
def down do
drop_if_exists(index("participants", [:url]))
end
end