(continued from previous post)
… was pretty simple. First, export products and categories to JSON files, using some very simple rake tasks:
Second, check the differences in schema (column names etc.) and, while trying to preserve IDs (pretty crucial for seamless import), import these JSON files into Spree store.
The final working import code is (I’ve decided that english will be the basic language for database content, while Polish Zloty will remain as the base currency) ended up as another rake tasks, this time within the codebase of new, Spree-powered engine lib/tasks/import.rake
It worked. Of course the import code required some work to achieve the final working state it’s now in, but basically it was one of the smoothest migrations I ever worked on.
I still have this itching urge to import orders as well, for all our customers to have a nice order history, but this is quite a task and I’ve left that in the backlog, “to be done when I’ll have both the time and will”.
Of course migrating data isn’t the only thing that had to be done in order to have a fully working new Spree-powered Bitspudlo.com.
But all the other steps are basically documented in a post on Spree group I wrote after completing the successful migration .