DEV: Drop user_id from chat_mentions (#25022)

This column is ignored since 62f423d
This commit is contained in:
Andrei Prigorshnev 2024-04-11 18:50:29 +04:00 committed by GitHub
parent 8b147b7f84
commit 463eff2bbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -19,7 +19,6 @@ end
#
# id :bigint not null, primary key
# chat_message_id :integer not null
# user_id :integer
# target_id :integer
# type :integer not null
# created_at :datetime not null

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class DropUserIdFromChatMentions < ActiveRecord::Migration[7.0]
DROPPED_COLUMNS ||= { chat_mentions: %i[user_id] }
def up
DROPPED_COLUMNS.each { |table, columns| Migration::ColumnDropper.execute_drop(table, columns) }
end
def down
raise ActiveRecord::IrreversibleMigration
end
end