Sha256: 74bd22d9edbf0bc19d9bd76e6f1e58e3677a54e24b7deb5395d83942b3284f22
Contents?: true
Size: 654 Bytes
Versions: 12
Compression:
Stored size: 654 Bytes
Contents
require 'rom/sql/schema/attributes_inferrer' module ROM module SQL module MySQL class TypeBuilder < Schema::TypeBuilder defines :db_type_mapping db_type_mapping( 'tinytext' => Types::String, 'text' => Types::String, 'mediumtext' => Types::String, 'longtext' => Types::String ).freeze def map_type(ruby_type, db_type, **_) map_db_type(db_type) || super end def map_db_type(db_type) self.class.db_type_mapping[db_type] end end end Schema::TypeBuilder.register(:mysql, MySQL::TypeBuilder.new.freeze) end end
Version data entries
12 entries across 12 versions & 1 rubygems