diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20200721195456_add_index_on_statuses_visibility.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/db/migrate/20200721195456_add_index_on_statuses_visibility.rb b/db/migrate/20200721195456_add_index_on_statuses_visibility.rb new file mode 100644 index 000000000..c45405e95 --- /dev/null +++ b/db/migrate/20200721195456_add_index_on_statuses_visibility.rb @@ -0,0 +1,7 @@ +class AddIndexOnStatusesVisibility < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def change + add_index :statuses, :visibility, where: 'deleted_at IS NULL', algorithm: :concurrently, name: :index_statuses_on_visibility + end +end |