code-corps/code-corps-api

View on GitHub
priv/repo/migrations/20171115201624_drop_github_repos_project_id_unique_index_if_exists.exs

Summary

Maintainability
Test Coverage
defmodule CodeCorps.Repo.Migrations.DropGithubReposProjectIdUniqueIndexIfExists do
  use Ecto.Migration

  def up do
    drop_if_exists index(:github_repos, [:project_id], unique: true)
    create_if_not_exists index(:github_repos, [:project_id])
  end

  def down do
    # no-op
  end
end