Sha256: 0df06f277669788f3101acdb1236714f894346fa747511294ea300a4fbe7c07a
Contents?: true
Size: 521 Bytes
Versions: 21
Compression:
Stored size: 521 Bytes
Contents
class MigrateToTaskGroups < ActiveRecord::Migration class FakeJobInvocation < ActiveRecord::Base 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
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
foreman_remote_execution-0.2.1 | db/migrate/20151217092555_migrate_to_task_groups.rb |