[Fix #3196] Convert YAML to JSON
This commit is contained in:
parent
36d6a43084
commit
2a758d0759
2 changed files with 22 additions and 3 deletions
|
@ -0,0 +1,17 @@
|
|||
namespace :after_party do
|
||||
desc 'Deployment task: migrate_types_de_champ_options_to_json'
|
||||
task migrate_types_de_champ_options_to_json: :environment do
|
||||
puts "Running deploy task 'migrate_types_de_champ_options_to_json'"
|
||||
|
||||
dirty_tdcs = TypeDeChamp.where.not(options: nil)
|
||||
progress = ProgressReport.new(dirty_tdcs.count)
|
||||
dirty_tdcs.find_each do |tdc|
|
||||
tdc.options_will_change!
|
||||
tdc.save
|
||||
progress.inc
|
||||
end
|
||||
progress.finish
|
||||
|
||||
AfterParty::TaskRecord.create version: '20181219175043'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue