mirror of
https://github.com/discourse/discourse.git
synced 2024-12-25 06:53:46 +08:00
f49e3e5731
This PR adds security_last_changed_at and security_last_changed_reason to uploads. This has been done to make it easier to track down why an upload's secure column has changed and when. This necessitated a refactor of the UploadSecurity class to provide reasons why the upload security would have changed. As well as this, a source is now provided from the location which called for the upload's security status to be updated as they are several (e.g. post creator, topic security updater, rake tasks, manual change).
9 lines
269 B
Ruby
9 lines
269 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddUploadSecurityLogColumns < ActiveRecord::Migration[6.0]
|
|
def change
|
|
add_column :uploads, :security_last_changed_at, :datetime, null: true
|
|
add_column :uploads, :security_last_changed_reason, :string, null: true
|
|
end
|
|
end
|