about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorpluralcafe-docker <docker@plural.cafe>2018-08-23 06:16:14 +0000
committerpluralcafe-docker <docker@plural.cafe>2018-08-23 06:16:14 +0000
commit0fa521de89168ef33423fc7306a33d4a1c3badf3 (patch)
treece3663d75ca93ea2d32e10de532eb18a230cf6e0 /db/migrate
parenta4935a8e24dcfa865fb330693d8ec90beca1aa98 (diff)
parent8aa58e34bb2b62192a997ac7ea8919b22fc45f80 (diff)
Merge branch 'glitch'
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180820232245_add_foreign_key_indices.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20180820232245_add_foreign_key_indices.rb b/db/migrate/20180820232245_add_foreign_key_indices.rb
new file mode 100644
index 000000000..e346c1f5b
--- /dev/null
+++ b/db/migrate/20180820232245_add_foreign_key_indices.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddForeignKeyIndices < ActiveRecord::Migration[5.2]
+  disable_ddl_transaction!
+
+  def change
+    add_index :follows, :target_account_id, algorithm: :concurrently
+    add_index :blocks, :target_account_id, algorithm: :concurrently
+    add_index :mutes, :target_account_id, algorithm: :concurrently
+    add_index :notifications, :from_account_id, algorithm: :concurrently
+    add_index :accounts, :moved_to_account_id, algorithm: :concurrently
+    add_index :statuses, :in_reply_to_account_id, algorithm: :concurrently
+    add_index :session_activations, :access_token_id, algorithm: :concurrently
+    add_index :oauth_access_grants, :resource_owner_id, algorithm: :concurrently
+  end
+end