#315 ✓invalid
Ara Vartanian

Migration generator - String to EnumString migration cycles

Reported by Ara Vartanian | October 26th, 2008 @ 04:05 PM | in Hobo 1.0 - Final

Here are the steps to reproduce:

Make an app with a simple model:

hobo test ruby script/generate hobo_model_resource thing status:string ruby script/generate hobo_migration rake db:migrate

Now in thing.rb, change:

status :string

to:

status enum_string(:new), :default => :new

And migrate the change:

ruby script/generate hobo_migration rake db:migrate

Now to show the problem, again try:

ruby script/generate hobo_migration

Hobo will generate a migration even though it should not that is identical on the up and on the down:

---------- Up Migration ----------

change_column :things, :status, :string, :default => :new, :limit => 255

---------- Down Migration --------

change_column :things, :status, :string, :default => "'--- :new\n'"

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages