about summary refs log tree commit diff
path: root/db/migrate/20200227214440_add_curated_status_index.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-03-01 14:32:53 -0600
committermultiple creatures <dev@multiple-creature.party>2020-03-01 14:32:53 -0600
commit3094f7face07156c42260e483f854d6cd06ec08f (patch)
tree2948e28a714923ae690f88c5df701f53e9e1e963 /db/migrate/20200227214440_add_curated_status_index.rb
parent2e46250f929169d9994db2dc8666c772dbdef570 (diff)
add column index for monsterfork implementation of world timeline
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