# Change the datatype of an attribute?

**URL:** <https://www.ruby-forum.com/t/change-the-datatype-of-an-attribute/113681>\
**Category:** Rails\
**Created:** [September 3, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/change-the-datatype-of-an-attribute/113681 "2007-09-03T22:10:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chadh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a6a055/32.png) [@chadh](https://www.ruby-forum.com/u/chadh)\
**Post date:** [September 3, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/change-the-datatype-of-an-attribute/113681/1 "2007-09-03T22:10:37Z")

</div>

Hey everyone

I’m building an application that is using a mySQL SET datatype sad

The problem is that ActiveRecord thinks this is a date! Here’s the  
relevant output from Model.columns:

#\<ActiveRecord::ConnectionAdapters::MysqlColumn:0x351b488  
@primary=false, @scale=nil, @sql\_type=“set(‘Any’,‘Grade School’,‘High  
School’,‘Some College’,‘Associates Degree’,‘Bachelors Degree’,‘Some Grad  
School’,‘Masters Degree’,‘PhD Candidate’,‘PhD’)”, @precision=nil,  
@default=nil, @limit=0, @type=:date, @name=“educations\_allowed”,  
@original\_default="", @null=false\>

I put into bold where its defining the type of this set as a :date.  
Where can I override this behavior so my program stops casting the  
strings I need to put there into dates?
