discourse/db/post_migrate/20240202052058_drop_badge_image_column.rb
Ted Johansson e071b74a79
DEV: Drop deprecated Badge#image column (#25536)
We just completed the 3.2 release, which marks a good time to drop some previously deprecated columns.

Since the column has been marked in ignored_columns, it has been inaccessible to application code since then. There's a tiny risk that this might break a Data Explorer query, but given the nature of the column, the years of disuse, and the fact that such a breakage wouldn't be critical, we accept it.
2024-02-02 14:09:55 +08:00

14 lines
317 B
Ruby

# frozen_string_literal: true
class DropBadgeImageColumn < ActiveRecord::Migration[7.0]
DROPPED_COLUMNS ||= { badges: %i[image] }
def up
DROPPED_COLUMNS.each { |table, columns| Migration::ColumnDropper.execute_drop(table, columns) }
end
def down
raise ActiveRecord::IrreversibleMigration
end
end