This repository has been archived by the owner on Jan 27, 2020. It is now read-only.
forked from mastodon/mastodon
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 mastodon#766 from pixiv/add-index-on-statuses-2018…
…0106 add index on statuses for /api/v1/accounts/:account_id/statuses (mastodon#6202)
- Loading branch information
Showing
2 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
db/migrate/20180106000232_add_index_on_statuses_for_api_v1_accounts_account_id_statuses.rb
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,10 @@ | ||
class AddIndexOnStatusesForApiV1AccountsAccountIdStatuses < ActiveRecord::Migration[5.1] | ||
disable_ddl_transaction! | ||
|
||
def change | ||
# safety_assured do | ||
add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106 | ||
# end | ||
remove_index :statuses, name: :index_statuses_on_account_id_id | ||
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