DEV: Drop user_options.disable_jump_reply column (#13646)

24ef4f7b removed the use of this column in 2019
This commit is contained in:
David Taylor 2021-07-06 10:47:17 +01:00 committed by GitHub
parent 4b55b59931
commit f999ef2d52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -1,6 +1,10 @@
# frozen_string_literal: true
class UserOption < ActiveRecord::Base
self.ignored_columns = [
"disable_jump_reply", # Remove once 20210706091905 is promoted from post_deploy to regular migration
]
self.primary_key = :user_id
belongs_to :user
before_create :set_defaults
@ -210,7 +214,6 @@ end
# external_links_in_new_tab :boolean default(FALSE), not null
# enable_quoting :boolean default(TRUE), not null
# dynamic_favicon :boolean default(FALSE), not null
# disable_jump_reply :boolean default(FALSE), not null
# automatically_unpin_topics :boolean default(TRUE), not null
# digest_after_minutes :integer
# auto_track_topics_after_msecs :integer

View File

@ -0,0 +1,17 @@
# frozen_string_literal: true
class DropDisableJumpReplyColumnFromUserOptions < ActiveRecord::Migration[6.1]
DROPPED_COLUMNS ||= {
user_options: %i{disable_jump_reply}
}
def up
DROPPED_COLUMNS.each do |table, columns|
Migration::ColumnDropper.execute_drop(table, columns)
end
end
def down
raise ActiveRecord::IrreversibleMigration
end
end