Sha256: faae2abb3fc439bd49ae4f67ee37c2ea8a6e2a8ebe51fd38c9f15ac943432cf5
Contents?: true
Size: 525 Bytes
Versions: 121
Compression:
Stored size: 525 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').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
121 entries across 121 versions & 1 rubygems