SELECT i.inumber as itemid, i.ititle as title, i.ibody as body, m.mname as author, m.mrealname as authorname, i.itime, i.imore as more, m.mnumber as authorid, m.memail as authormail, m.murl as authorurl, c.cname as category, i.icat as catid, i.iclosed as closed FROM nucleus_item as i, nucleus_member as m, nucleus_category as c WHERE i.iblog=1 and i.iauthor=m.mnumber and i.icat=c.catid and i.idraft=0 and i.itime<="2008-12-05 03:51:18" and inumber=47 ORDER BY i.itime DESC LIMIT 0,1
stdClass Object
(
[itemid] => 47
[title] => Rails: Staying away from Enums in Migrations
[body] => I was fiddling with migrations, and found these regarding the use of MySQL-ish ENUMs in Migrations:
Basically, ENUMs aren't supported, and using Validations might be a good work-around, but is dependent on you putting (and keeping) all of the logic in your Rails app. If you need to go cross-app (with some other thing that ain't rails), then use CHECK or other DB constraints to enforce desired values.
[author] => erin
[authorname] => Erin Schnabel
[itime] => 2006-12-29 14:48:06
[more] =>
[authorid] => 1
[authormail] => erinschnabel@gmail.com
[authorurl] => http://ebullientworks.com/
[category] => General
[catid] => 1
[closed] => 1
)
Friday, 29 December 2006
Rails: Staying away from Enums in Migrations
I was fiddling with migrations, and found these regarding the use of MySQL-ish ENUMs in Migrations:
Basically, ENUMs aren't supported, and using Validations might be a good work-around, but is dependent on you putting (and keeping) all of the logic in your Rails app. If you need to go cross-app (with some other thing that ain't rails), then use CHECK or other DB constraints to enforce desired values.
posted by
erin at 02:48 PM
in
General
tags:
ruby /
rails /
data types