-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1196 from code-corps/fix-migrations
Fix migrations
- Loading branch information
Showing
3 changed files
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
priv/repo/migrations/20171115201624_drop_github_repos_project_id_unique_index_if_exists.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters