rake db:seed
Does rerunning seed data drop the existing seed data and re-create or adds just the new records whenever you modify the seed data?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you run
rake db:seed, db/seeds.rb is only included with the rails environment.Therefore, nothing else is done on your database than what you mention it to do.
I usually put the following at the top of my db/seeds file :
This way, all previous seed data is removed, and I get this fresh new proper data I want in my dev environment.