5

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?

lucapette
  • 20,564
  • 6
  • 65
  • 59
Mattia Lipreri
  • 953
  • 1
  • 16
  • 30

1 Answers1

5

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.

Ryan Bigg
  • 106,965
  • 23
  • 235
  • 261