Sha256: ab779de188cb412d0f48f40c2e3b5a28f99589c0657b975f759936d650568ae6
Contents?: true
Size: 621 Bytes
Versions: 166
Compression:
Stored size: 621 Bytes
Contents
class AddSyncPlanTaskGroup < ActiveRecord::Migration[5.2] class FakeSyncPlan < Katello::Model self.table_name = 'katello_sync_plans' end def up add_column :katello_sync_plans, :task_group_id, :integer, :index => true add_foreign_key :katello_sync_plans, :foreman_tasks_task_groups, :column => :task_group_id FakeSyncPlan.all.each do |plan| plan.task_group_id ||= Katello::SyncPlanTaskGroup.create!.id plan.save! end end def down remove_column :katello_sync_plans, :task_group_id ForemanTasks::TaskGroup.where(:type => "Katello::SyncPlanTaskGroup").delete_all end end
Version data entries
166 entries across 166 versions & 1 rubygems