remove backwards compatible failed_jobs.original_id column
This was deprecated in a previous release. closes CNVS-12828 test plan: failed jobs should still show in the UI properly and record their original job id, including in rails3. Change-Id: I0e8ff9af4e0d0aeb81dada3a91cad56c2b56bdac Reviewed-on: https://gerrit.instructure.com/34359 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> QA-Review: August Thornton <august@instructure.com> Product-Review: Brian Palmer <brianp@instructure.com>
This commit is contained in:
parent
3ed42f27e0
commit
b42545b038
|
@ -34,6 +34,7 @@ class ActiveRecord::Base
|
|||
'discussion_topics' => %w(authorization_list_id),
|
||||
'enrollment_terms' => %w(sis_data sis_name),
|
||||
'enrollments' => %w(invitation_email can_participate_before_start_at limit_priveleges_to_course_sections),
|
||||
'failed_jobs' => %w(original_id),
|
||||
'groups' => %w(sis_name type groupable_id groupable_type),
|
||||
'notification_policies' => %w(user_id),
|
||||
'page_views' => %w(contributed),
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
class DropFailedJobsOriginalId < ActiveRecord::Migration
|
||||
tag :postdeploy
|
||||
|
||||
def self.connection
|
||||
Delayed::Backend::ActiveRecord::Job.connection
|
||||
end
|
||||
|
||||
def self.up
|
||||
remove_column :failed_jobs, :original_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :failed_jobs, :original_id, :integer, limit: 8
|
||||
end
|
||||
end
|
|
@ -353,10 +353,6 @@ module Delayed
|
|||
class Failed < Job
|
||||
include Delayed::Backend::Base
|
||||
self.table_name = :failed_jobs
|
||||
|
||||
def original_job_id
|
||||
read_attribute(:original_job_id) || read_attribute(:original_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -555,7 +555,6 @@ class Job
|
|||
def original_job_id
|
||||
id
|
||||
end
|
||||
alias_method :original_id, :original_job_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue