Rails 3 Migration Alter Float Length/Decimal?

Personal experience what works best (since MySQL/sqlite sometimes refuses changes to columns): Create a new column, copy the data, delete the old column, rename the new column.

Personal experience what works best (since MySQL/sqlite sometimes refuses changes to columns): Create a new column, copy the data, delete the old column, rename the new column. # Example for latitude add_column :skateparks, :latitude2, :decimal, :precision => 15, :scale => 12 execute "UPDATE skateparks SET latitude2 = latitude" remove_column :skateparks, :latitude rename_column :skateparks, :latitude2, :latitude EDIT: On the second look :float, { :length => 15, :decimals => 12 } seems to be wrong. I assume you meant: :decimal, :precision => 15, :scale => 12?

I tried this but the newly created columns don't seem to be accepting the :length or :decimals options. I end up w/ a float that has length = 0 and decimals = 0 – Kyle Decot Jun 19 '11 at 10:08 Updated the answer. I think you messed up float/decimal and the respective settings.

Read more here. – Marcel Jackwerth Jun 19 '11 at 16:20 You're correct. I should of been using :decimal.

I've updated my code and everything works now. Thanks! – Kyle Decot Jun 20 '11 at 17:06.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions