spree/spree — pull request #5431 by hnatt (2014-09-29 19:30:47+00:00)
Title: Fix db:bootstrap task

Migrations, when loaded, are breaking `spree_sample:load` subtask of `db:bootstrap`. The problem with migrations is that they patch models and load them while DB has outdated schema, resulting in "blast from the past" kind of models.

This PR fixes the `db:bootstrap` by patching back the Product model when its association is renamed in later migration and by reloading all loaded models' attributes before `spree_sample:load`.