small medium large xlarge

09 Aug 2008, 19:48
Robert Goddard (5 posts)


I can’t figure out why I’m getting an error when I’m running rake db:migrate to add the price column to products table:

hapa:~/Sites/depot hapa$ rake db:migrate
(in /Users/hapa/Sites/depot)
== 2 AddPriceToProduct: migrating =============================================
-- add_column(:products, :price, :decimal, {:precision=>8, :scale=>2, :default=>0})
rake aborted!
SQLite3::SQLException: near "ADD": syntax error: ALTER TABLE products ADD "price" decimal(8,2) DEFAULT 0


Thanks, Scott

09 Aug 2008, 19:57
Robert Goddard (5 posts)

I see someone else had the same issue…

09 Aug 2008, 20:19
Sam Ruby (633 posts)

Yes, please make sure that you are running SQLite3 version 3.2.0 or later.

09 Aug 2008, 22:45
Robert Goddard (5 posts)

Thank you that info. For the sake of time I’ve switched to MySQL successfully.

You must be logged in to comment