-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hidden seed data in migrations #1502
Comments
Working on it! 👍 |
I've made a dump right after the migration, and after the reset.
What do you think about it? |
Thanks for the work on this. This is very much appreciated. I think we should actually put only the bare minimum of what's needed to get a store up and running into the seeds. And most importantly we should copy the seeds over to the seeds file of the host app, in order to be able to change things before seeding. Lots of stores may not using all of these return reasons for instance. This means we should update the install task after we updated the seeds so it copies the seeds over instead of just running them, but this could be another PR. I'm fine with having one PR that copies all seeds from the migrations into the seeds now and accept another one that changes the install task. |
When running seeds without migrations (for example in a staging environment when we load the schema) it will not create this reimbursement type, which is instead required. see solidusio#1502
I was using
rake db:reset
to reset my database when I realized some default Solidus seed data is missing. After searching through the code, I noticed that the Solidus migrations contain some hidden seed data such as the default StockLocation.The problem is that when running
rake db:reset
it is doingrake db:schema:load
, which only recreates database tables based on thedb/schema.rb
file and the hidden seed data from migrations is never created.I think the expected behavior should be that migrations only create the schema, while data such as the default StockLocation is extracted into the seeds.
The text was updated successfully, but these errors were encountered: