about summary refs log tree commit diff
path: root/db/migrate/20220116202951_add_deleted_at_index_on_statuses.rb
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-01-31 12:50:14 -0600
committerStarfall <us@starfall.systems>2022-01-31 12:50:14 -0600
commit17265f47f8f931e70699088dd8bd2a1c7b78112b (patch)
treea1dde2630cd8e481cc4c5d047c4af241a251def0 /db/migrate/20220116202951_add_deleted_at_index_on_statuses.rb
parent129962006c2ebcd195561ac556887dc87d32081c (diff)
parentd6f3261c6cb810ea4eb6f74b9ee62af0d94cbd52 (diff)
Merge branch 'glitchsoc'
Diffstat (limited to 'db/migrate/20220116202951_add_deleted_at_index_on_statuses.rb')
-rw-r--r--db/migrate/20220116202951_add_deleted_at_index_on_statuses.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/migrate/20220116202951_add_deleted_at_index_on_statuses.rb b/db/migrate/20220116202951_add_deleted_at_index_on_statuses.rb
new file mode 100644
index 000000000..dc3362552
--- /dev/null
+++ b/db/migrate/20220116202951_add_deleted_at_index_on_statuses.rb
@@ -0,0 +1,7 @@
+class AddDeletedAtIndexOnStatuses < ActiveRecord::Migration[6.1]
+  disable_ddl_transaction!
+
+  def change
+    add_index :statuses, :deleted_at, where: 'deleted_at IS NOT NULL', algorithm: :concurrently
+  end
+end