Add stable ids to all types de champ
This commit is contained in:
parent
8d22275742
commit
c1a2506b01
1 changed files with 15 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
||||||
|
namespace :after_party do
|
||||||
|
desc 'Deployment task: add_stable_id_to_types_de_champ'
|
||||||
|
task add_stable_id_to_types_de_champ: :environment do
|
||||||
|
types_de_champ = TypeDeChamp.where(stable_id: nil)
|
||||||
|
bar = RakeProgressbar.new(types_de_champ.count)
|
||||||
|
|
||||||
|
types_de_champ.find_each do |type_de_champ|
|
||||||
|
type_de_champ.update_column(:stable_id, type_de_champ.id)
|
||||||
|
bar.inc
|
||||||
|
end
|
||||||
|
bar.finished
|
||||||
|
|
||||||
|
AfterParty::TaskRecord.create version: '20181123181252'
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue