On May 2, 2009, at 6:04 PM, Sasha Sasha wrote:

>
> Hi
> I have a problem im migration
>
> 1) ruby script/generate migration add_price
>
> 2)
>
> class AddPrice < ActiveRecord::Migration
>  def self.up
>      add_column :products, :price, :precesion => 8, :scale => 2 ,
> :default => 0
>  end
>
>  def self.down
>       remove_column :products, :price
>  end
> end
>
> 3)Error
>
> ==  AddPrice: migrating
> =======================================================
> -- add_column(:products, :price, :decimal, {:scale=>2, :default=>0,
> :precesion=>8})
> rake aborted!
> An error has occurred, all later migrations canceled:
>
> Error adding decimal column: precision cannot be empty if scale if
> specified
>
>
> ??? help me

Compare the spelling in the error message to the spelling in your  
migration.

-Rob

Rob Biedenharn          http://agileconsultingllc.com
[email protected]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to