diff options
author | takayamaki <fsgiko@gmail.com> | 2017-11-30 11:35:54 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-11-30 03:35:54 +0100 |
commit | dc1ebd45a30d806fcef2dc33679457285ba430b4 (patch) | |
tree | 386db1e846798719ce487dd299f5d2c8574b1c3f /db/migrate | |
parent | f0d4c7d7ab09d0f98685c20be187e6eb701be497 (diff) |
add index on stream_entries table (#5793)
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20171129172043_add_index_on_stream_entries.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/db/migrate/20171129172043_add_index_on_stream_entries.rb b/db/migrate/20171129172043_add_index_on_stream_entries.rb new file mode 100644 index 000000000..478530c7f --- /dev/null +++ b/db/migrate/20171129172043_add_index_on_stream_entries.rb @@ -0,0 +1,7 @@ +class AddIndexOnStreamEntries < ActiveRecord::Migration[5.1] + def change + commit_db_transaction + add_index :stream_entries, [:account_id, :activity_type, :id], algorithm: :concurrently + remove_index :stream_entries, name: :index_stream_entries_on_account_id + end +end |