-
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.
This update drops the `organization_memberships` table, removes all related temporary migration tasks from the `priv/repo/scripts` directory and removes all occurrences of organization memberships throughout the API codebase. Resolves #718.
- Loading branch information
1 parent
beeaeb8
commit f54e6a3
Showing
21 changed files
with
24 additions
and
437 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
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
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
20 changes: 20 additions & 0 deletions
20
priv/repo/migrations/20170318082740_drop_organization_membership.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,20 @@ | ||
defmodule CodeCorps.Repo.Migrations.DropOrganizationMembership do | ||
use Ecto.Migration | ||
|
||
def up do | ||
drop index :organization_memberships, [:member_id, :organization_id] | ||
drop table(:organization_memberships) | ||
end | ||
|
||
def down do | ||
create table(:organization_memberships) do | ||
add :role, :string, null: false | ||
add :organization_id, references(:organizations, on_delete: :nothing), null: false | ||
add :member_id, references(:users, on_delete: :nothing), null: false | ||
|
||
timestamps() | ||
end | ||
|
||
create index :organization_memberships, [:member_id, :organization_id], unique: true | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.