about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2017-11-30 03:17:12 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2017-11-30 03:17:12 +0000
commitad46bc9772dfc52c7ed522658eda1a3ef608a7b3 (patch)
tree12be46cac80eadcddc3ab122f1bda36d9c67a07c /db/migrate
parentd020ed1e05278a4b3e5d1ed60ee03e511bb513e3 (diff)
parent4c6b5dbe96b565d3db3cbf0912f3b9911bc3922a (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20171129172043_add_index_on_stream_entries.rb7
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