code-corps/code-corps-api

View on GitHub
priv/repo/migrations/20171101023309_add_github_repo_to_github_comments.exs

Summary

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

  def change do
    alter table(:github_comments) do
      add :github_repo_id, references(:github_repos, on_delete: :nothing)
    end

    create index(:github_comments, [:github_repo_id])
  end
end