Once upon a time, I had a model object with a migration like:

add_column :orders, :status, :string

Then an evil witch came along and changed my model to:

class Order < ActiveRecord::Base
  fields do
    status enum_string(:new, :unpaid, :canceled), :default => :new
    ...
  end
end

And now, every time I generate a hobo migration, I get:

  def self.up
    ...
    change_column :orders, :status, :string, :default => :new, :limit
=> 255
  end

  def self.down
    ...
    change_column :orders, :status, :string, :default => "'--- :new
\n'"
  end


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to