mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 20:15:43 +08:00
DEV: drop ignored columns (#26755)
chat_channels - last_message_sent_at
This commit is contained in:
parent
dbe923d26e
commit
0f2067b363
plugins/chat
@ -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
|
||||
|
13
plugins/chat/db/post_migrate/20240425133407_drop_chat_channels_last_message_sent_at.rb
Normal file
13
plugins/chat/db/post_migrate/20240425133407_drop_chat_channels_last_message_sent_at.rb
Normal 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
|
Loading…
x
Reference in New Issue
Block a user