Sha256: 623143ca4ed622c8002ed5a41960e56c771919c6547c93654aa5c7e4bdb8af37
Contents?: true
Size: 668 Bytes
Versions: 4
Compression:
Stored size: 668 Bytes
Contents
module Torque module PostgreSQL module Adapter module ColumnDumper # Adds +:subtype+ as a valid migration key unless Torque::PostgreSQL::AR521 def migration_keys super + [:subtype] end 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 column.type == :enum end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems