From 3094f7face07156c42260e483f854d6cd06ec08f Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 1 Mar 2020 14:32:53 -0600 Subject: add column index for monsterfork implementation of world timeline --- db/migrate/20200227214440_add_curated_status_index.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 db/migrate/20200227214440_add_curated_status_index.rb 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 -- cgit