fix(export): set a random UUID key before forcing not null
This commit is contained in:
parent
31992b1e26
commit
5d448fd152
1 changed files with 13 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
namespace :after_party do
|
||||
desc 'Deployment task: null_exports_key_to_uuid'
|
||||
task null_exports_key_to_uuid: :environment do
|
||||
puts "Running deploy task 'null_exports_key_to_uuid'"
|
||||
|
||||
Export.where(key: nil).update_all(key: SecureRandom.uuid)
|
||||
|
||||
# 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
|
Loading…
Reference in a new issue