discourse/db/migrate/20240829140226_drop_old_notification_id_columns.rb
Alan Guo Xiang Tan 9f12dd28f9
DEV: Promote historic post_deploy migrations (#34273)
This commit promotes all post_deploy migrations which existed in
Discourse v3.4.0 (timestamp <= 20241023041126)
2025-08-13 14:10:50 +08:00

18 lines
473 B
Ruby

# frozen_string_literal: true
class DropOldNotificationIdColumns < ActiveRecord::Migration[7.1]
DROPPED_COLUMNS = {
notifications: %i[old_id],
shelved_notifications: %i[old_notification_id],
users: %i[old_seen_notification_id],
user_badges: %i[old_notification_id],
}
def up
DROPPED_COLUMNS.each { |table, columns| Migration::ColumnDropper.execute_drop(table, columns) }
end
def down
raise ActiveRecord::IrreversibleMigration
end
end