mobilizon.chapril.org-mobil.../priv/repo/migrations/20210730143924_put_unique_index_on_participants_urls.exs
Thomas Citharel 042d09b8cb
Put unique index on participants urls
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:22 +02:00

12 lines
258 B
Elixir

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