mobilizon/priv/repo/migrations/20210422155913_add_index_to_addresses.exs

12 lines
239 B
Elixir
Raw Normal View History

defmodule Mobilizon.Storage.Repo.Migrations.AddIndexToAddresses do
use Ecto.Migration
def up do
create_if_not_exists(unique_index("addresses", [:url]))
end
def down do
drop_if_exists(index("addresses", [:url]))
end
end