-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e64400
commit b038ab8
Showing
2 changed files
with
15 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class ChangeIndexOnEvents < ActiveRecord::Migration | ||
def change | ||
remove_index :events, :post_id | ||
remove_index :events, :member_id | ||
remove_index :events, :transfer_id | ||
|
||
add_index :events, :post_id, where: 'post_id IS NOT NULL' | ||
add_index :events, :member_id, where: 'member_id IS NOT NULL' | ||
add_index :events, :transfer_id, where: 'transfer_id IS NOT NULL' | ||
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