Method: Sequel::Model.column_type
- Defined in:
- lib/sequel/model_patch.rb
.column_type(name, type) ⇒ Object
set the column type to an existing column column_type :‘bad name’, :datetime
189 190 191 192 193 194 195 |
# File 'lib/sequel/model_patch.rb', line 189 def column_type(name, type) @datatypes = model.db_schema # if things went wrong and the db_schema could not load up # have to set up the datatypes entry manually @datatypes[name] = {} unless @datatypes[name] @datatypes[name][:type] = type end |