diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-21 14:57:49 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:44:01 -0500 |
commit | 1c9e9213111471613c40ed74d7c0917b560b89f1 (patch) | |
tree | 72779eb410749f25d039dadb75afcc0907046081 /db/migrate | |
parent | 3f79c75942de0098d582916af3d12f506394d97d (diff) |
[Database] Add index on statuses.visibility column
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 |