1 parent
73df3d1258
commit
9cf2aeb139
6 files changed
+28
-7
No files matched your search
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
class AddCompletedAt < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :candidates, :completed_at, :datetime, after: :completed
|
||||
|
||||
Candidate.reset_column_information
|
||||
Candidate.where(completed: true).each do |candidate|
|
||||
candidate.completed_at = candidate.updated_at
|
||||
candidate.save
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user