Sha256: 778c4905da9a0b869e08fc3981d928ed3d195ad9e42a6c50af3150ed9097f56c
Contents?: true
Size: 617 Bytes
Versions: 20
Compression:
Stored size: 617 Bytes
Contents
module Torque module PostgreSQL module Adapter module ColumnDumper # Adds +:subtype+ as a valid migration key def migration_keys super + [:subtype] end # Adds +:subtype+ option to the default set def prepare_column_options(column) spec = super if subtype = schema_subtype(column) spec[:subtype] = subtype end spec end private def schema_subtype(column) column.sql_type.to_sym.inspect if [:enum].include? column.type end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems