Hobo / hobo

The web app builder for Rails (moved from tablatom/hobo)
http://hobocentral.net
103 stars 39 forks source link

Migration Generator changes column type #133

Open haslinger opened 9 years ago

haslinger commented 9 years ago

I see a strange issue here: I added to the user model

erp_account_nr   :string, :index => true
erp_contact_nr   :string

a long time ago. Suddenly when i run the migration generator (because of a change in another model), it also wants to change

---------- Up Migration ----------
change_column :users, :erp_contact_nr, :integer, :limit => 4
change_column :users, :erp_account_nr, :integer, :limit => 4

and correspondingly

---------- Down Migration --------
change_column :users, :erp_contact_nr, :string
change_column :users, :erp_account_nr, :string

It's not a shopstopper, I just don't migrate immediately, fix the migration by hand and run it, but I don't get a few things:

Probably I'm doing something completely wrong here ...