about summary refs log tree commit diff
path: root/db/migrate/20200227214440_add_curated_status_index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200227214440_add_curated_status_index.rb')
-rw-r--r--db/migrate/20200227214440_add_curated_status_index.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/migrate/20200227214440_add_curated_status_index.rb b/db/migrate/20200227214440_add_curated_status_index.rb
new file mode 100644
index 000000000..4c489052f
--- /dev/null
+++ b/db/migrate/20200227214440_add_curated_status_index.rb
@@ -0,0 +1,7 @@
+class AddCuratedStatusIndex < ActiveRecord::Migration[5.2]
+  def up
+    safety_assured do
+      add_index :statuses, [:id, :account_id], where: 'curated AND (NOT hidden) AND (deleted_at IS NULL)', order: { id: :desc }, name: :index_statuses_curated_20200301
+    end
+  end
+end