[Rails] Re: tinyint(1) and boolean

2015-05-21 Thread Matt Jones
On Sunday, 10 January 2010 14:57:15 UTC-5, Matt Jones wrote: > > On Jan 9, 6:16 pm, codeinnova wrote: > > So i had a boolean attribute in my model which gets interpreted to > > tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a > > range in mysql and i want to change my boolean at

[Rails] Re: tinyint(1) and boolean

2010-01-11 Thread Jeff Lewis
I second Matt's point about potential for confusion. A boolean val implies one of two values: true or false. What you're asking for -- 1 of 3 potential vals -- seems to rule out the use of a boolean to represent that val. So, I'd recommend using some other data type. Jeff On Jan 10, 11:57 am,

[Rails] Re: tinyint(1) and boolean

2010-01-10 Thread Matt Jones
On Jan 9, 6:16 pm, codeinnova wrote: > So i had a boolean attribute in my model which gets interpreted to > tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a > range in mysql and i want to change my boolean attribute to an > attribute which can accept 3 values(0,1,2). > I made th

[Rails] Re: tinyint(1) and boolean

2010-01-09 Thread Frederick Cheung
On Jan 9, 11:16 pm, codeinnova wrote: > So my question really is, how can i make rails to accept more values > without changing the type to something other than tinyint(1)? And why > this weirdness? Mysql doesn't have an actual boolean type so rails usually uses tinyint (1) columns instead. There