chore(attestation): backfill all current attestation templates v2 as draft

This commit is contained in:
Colin Darie 2024-05-28 17:54:29 +02:00
parent ad3c5a7493
commit 45fcfd2d16
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4

View file

@ -0,0 +1,15 @@
# frozen_string_literal: true
namespace :after_party do
desc 'Deployment task: attestation_template_v2_as_draft'
task backfill_attestation_template_v2_as_draft: :environment do
puts "Running deploy task 'backfill_attestation_template_v2_as_draft'"
AttestationTemplate.v2.update_all(state: :draft)
# Update task as completed. If you remove the line below, the task will
# run with every deploy (or every time you call after_party:run).
AfterParty::TaskRecord
.create version: AfterParty::TaskRecorder.new(__FILE__).timestamp
end
end