mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
DEV: drop ignored columns (#26755)
chat_channels - last_message_sent_at
This commit is contained in:
parent
dbe923d26e
commit
0f2067b363
@ -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
|
||||||
|
@ -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…
Reference in New Issue
Block a user