-
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 #1371 from malandrina/malandrina-normalize-user-type
Ensure organization user type is downcased
- Loading branch information
Showing
4 changed files
with
27 additions
and
3 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
23 changes: 23 additions & 0 deletions
23
priv/repo/migrations/20180113002017_normalize_organization_user_type.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,23 @@ | ||
defmodule CodeCorps.Repo.Migrations.NormalizeOrganizationUserType do | ||
use Ecto.Migration | ||
|
||
def up do | ||
execute( | ||
""" | ||
UPDATE github_users | ||
SET type = 'organization' | ||
WHERE type = 'Organization' | ||
""" | ||
) | ||
end | ||
|
||
def down do | ||
execute( | ||
""" | ||
UPDATE github_users | ||
SET type = 'Organization' | ||
WHERE type = 'organization' | ||
""" | ||
) | ||
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
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