module Upknit::SetDefaultReferenceTypeToUuid

A module which let migrations declare UUID type on references

Public Instance Methods

options_for_migration() click to toggle source
Calls superclass method
# File lib/upknit/set_default_reference_type_to_uuid.rb, line 6
def options_for_migration
  super.tap do |options|
    if reference? && !polymorphic?
      options[:type] ||= :uuid
    end
  end
end