Sha256: c51dcda4abaa620bd95bcfcf2172bb0dc621f69a90092f47f05dc366daf882cd
Contents?: true
Size: 530 Bytes
Versions: 19
Compression:
Stored size: 530 Bytes
Contents
class MigrateToTaskGroups < ActiveRecord::Migration[4.2] class FakeJobInvocation < ApplicationRecord self.table_name = 'job_invocations' end def up say 'Migrating from locks to task groups' FakeJobInvocation.where('task_group_id IS NULL AND task_id IS NOT NULL').find_each do |job_invocation| task_group = JobInvocationTaskGroup.new task_group.task_ids = [job_invocation.task_id] task_group.save! job_invocation.task_group_id = task_group.id job_invocation.save! end end end
Version data entries
19 entries across 19 versions & 1 rubygems