Sha256: e7ff838f6f44921b92606d1b9a91bd4f2ca56e41349ce79bc74ebdcd3bfd4969
Contents?: true
Size: 516 Bytes
Versions: 7
Compression:
Stored size: 516 Bytes
Contents
class <%= @class_name %><%= @class_suffix %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version.to_s %>] def change <% @checks[:foreign_keys].each do |fk| %> reversible do |dir| dir.up do <% if fk.nullable? %> # <%= fk.to_zombie.migration %> <%= fk.to_zombie.migration(set_null: true) %> <% else %> # column <%= fk.from_column %> can't be set to null <%= fk.to_zombie.migration %> <% end %> end end <%= fk.migration %> <% end %> end end
Version data entries
7 entries across 7 versions & 1 rubygems