Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade spree to 1.0.0

I'm trying to upgrade Spree from 0.7.0 to 1.0.0, I added in my gemfile

gem 'spree', '1.0.0'

and mounted the routes by adding this in routes.rb

Store::Application.routes.draw do
  mount Spree::Core::Engine, :at => "/"
end

after that I had override some controllers and model and I added the namespace Spree:: in this way

Spree::ProductsController.class_eval do

now I'm stuck on this error

Mysql2::Error: Table 'store_development.spree_product_groups' doesn't exist: SHOW FIELDS FROM `spree_product_groups`

and it is totally right cause the table does not exists, but it is named without the spree_ prefix, how can i quickly fix it? I suppose that some new column or table has been added to the database, how can i check this? Is there a procedure to upgrade safely spree?

like image 435
Mattia Lipreri Avatar asked Feb 15 '12 17:02

Mattia Lipreri


1 Answers

Did you run the new migrations for Spree 1.0?

rake railties:install:migrations
rake db:migrate

These migrations that'll be copied over will rename your tables correctly.

like image 164
Ryan Bigg Avatar answered Sep 23 '22 13:09

Ryan Bigg