Sha256: 0ae85de0b7e6168e8dd14da4b5c3f8263df7369ffaa0e8b1c1041f2864ea765e

Contents?: true

Size: 525 Bytes

Versions: 2

Compression:

Stored size: 525 Bytes

Contents

class NullifyGroupOnDelete < ActiveRecord::Migration[6.0]
  def up
    remove_foreign_key :foreman_patch_rounds, name: :foreman_patch_rounds_by_group
    add_foreign_key :foreman_patch_rounds, :foreman_patch_groups, column: :group_id, name: :foreman_patch_rounds_by_group, on_delete: :nullify
  end

  def down
    remove_foreign_key :foreman_patch_rounds, name: :foreman_patch_rounds_by_group
    add_foreign_key :foreman_patch_rounds, :foreman_patch_groups, column: :group_id, name: :foreman_patch_rounds_by_group
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_patch-1.1.6.alpha5 db/migrate/20230706092400_nullify_group_on_delete.rb
foreman_patch-1.1.6.alpha4 db/migrate/20230706092400_nullify_group_on_delete.rb