diff --git a/plugins/chat/app/models/chat/channel.rb b/plugins/chat/app/models/chat/channel.rb index 652b12edf7b..d7d70697f69 100644 --- a/plugins/chat/app/models/chat/channel.rb +++ b/plugins/chat/app/models/chat/channel.rb @@ -296,7 +296,6 @@ end # description :text # status :integer default("open"), not null # user_count :integer default(0), not null -# last_message_sent_at :datetime not null # auto_join_users :boolean default(FALSE), not null # user_count_stale :boolean default(FALSE), not null # slug :string diff --git a/plugins/chat/db/post_migrate/20240425133407_drop_chat_channels_last_message_sent_at.rb b/plugins/chat/db/post_migrate/20240425133407_drop_chat_channels_last_message_sent_at.rb new file mode 100644 index 00000000000..0a3b61d6c98 --- /dev/null +++ b/plugins/chat/db/post_migrate/20240425133407_drop_chat_channels_last_message_sent_at.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class DropChatChannelsLastMessageSentAt < ActiveRecord::Migration[7.0] + DROPPED_COLUMNS ||= { chat_channels: %i[last_message_sent_at] } + + def up + DROPPED_COLUMNS.each { |table, columns| Migration::ColumnDropper.execute_drop(table, columns) } + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end