mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-01 04:07:14 +08:00
This commit promotes all post_deploy migrations which existed in Discourse v3.4.0 (timestamp <= 20241023041126)
18 lines
473 B
Ruby
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
|