Module: DataMapper::Adapters::MysqlAdapter::Migration::ClassMethods
- Included in:
- DataMapper::Adapters::MysqlAdapter
- Defined in:
- lib/dm-core/adapters/mysql_adapter.rb
Instance Method Summary collapse
-
#type_map ⇒ DataMapper::TypeMap
TypeMap for MySql databases.
Instance Method Details
#type_map ⇒ DataMapper::TypeMap
TypeMap for MySql databases.
TODO: move to dm-more/dm-migrations
122 123 124 125 126 127 128 |
# File 'lib/dm-core/adapters/mysql_adapter.rb', line 122 def type_map @type_map ||= TypeMap.new(super) do |tm| tm.map(Integer).to('INT').with(:size => 11) tm.map(TrueClass).to('TINYINT').with(:size => 1) # TODO: map this to a BIT or CHAR(0) field? tm.map(Object).to('TEXT') end end |