Module: ActiveUUID::Patches::Migrations
- Defined in:
- lib/activeuuid/patches.rb
Instance Method Summary collapse
Instance Method Details
#uuid(*column_names) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/activeuuid/patches.rb', line 8 def uuid(*column_names) = column_names. column_names.each do |name| type = @base.adapter_name.downcase == 'postgresql' ? 'uuid' : 'binary(16)' column(name, "#{type}#{' PRIMARY KEY' if options.delete(:primary_key)}", ) end end |