DEV: drop ignored columns (#26755)

chat_channels - last_message_sent_at
This commit is contained in:
Joffrey JAFFEUX 2024-04-25 16:35:23 +02:00 committed by GitHub
parent dbe923d26e
commit 0f2067b363
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -296,7 +296,6 @@ end
# description :text # description :text
# status :integer default("open"), not null # status :integer default("open"), not null
# user_count :integer default(0), not null # user_count :integer default(0), not null
# last_message_sent_at :datetime not null
# auto_join_users :boolean default(FALSE), not null # auto_join_users :boolean default(FALSE), not null
# user_count_stale :boolean default(FALSE), not null # user_count_stale :boolean default(FALSE), not null
# slug :string # slug :string

View File

@ -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