small medium large xlarge

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

Hi,

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

</code>

Thanks, Scott

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

I see someone else had the same issue…

http://forums.pragprog.com/forums/66/topics/408

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

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

Eagle_pragsmall
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