feat: add comments

This commit is contained in:
Shivam Mishra
2023-06-02 18:08:22 +05:30
parent 7f7c81ecab
commit 0c53e8155c
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -39,6 +39,7 @@
class ConversationWithLabel < ApplicationRecord
def self.refresh
# https://github.com/scenic-views/scenic#what-about-materialized-views
# needs atleast one unuque index for concurrent refresh
Scenic.database.refresh_materialized_view(table_name, concurrently: true, cascade: false)
end
@@ -2,6 +2,7 @@ class AddIndexToConversationWithLabelsView < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
# needs atleast one unuque index for concurrent refresh
add_index :conversation_with_labels, :id, unique: true, algorithm: :concurrently
add_index :conversation_with_labels, :account_id, algorithm: :concurrently
add_index :conversation_with_labels, :status, algorithm: :concurrently