Progress with DMs
Progress with DMs
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
class AddUnreadCountToChatConversationAccounts < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
add_column :chat_conversation_accounts, :unread_count, :bigint
|
||||
change_column_default :chat_conversation_accounts, :unread_count, 0
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :chat_conversation_accounts, :unread_count
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class RemoveIsUnreadFromChatConversationAccounts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
safety_assured { remove_column :chat_conversation_accounts, :is_unread }
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddExpiresAtToChatMessages < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :chat_messages, :expires_at, :datetime, null: true, default: nil
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
class BackfillAddUnreadCountToChatConversationAccounts < ActiveRecord::Migration[5.2]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
ChatConversationAccount.in_batches do |relation|
|
||||
relation.update_all unread_count: 0
|
||||
sleep(0.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddUnreadCountToChatConversationAccountsNotNull < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column_null :chat_conversation_accounts, :unread_count, false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddChatMessageExpirationPolicyToChatConversationAccounts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :chat_conversation_accounts, :chat_message_expiration_policy, :string, null: true, default: nil
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user