Showing posts with label yml. Show all posts
Showing posts with label yml. Show all posts

Thursday, February 25, 2010

rails commands for db dataset load and add

If you have db/dataset and db/dataset/dev folders that contain yml files, you can upload yml data to your db as follows:

rake db:dataset:load

However, if you load dev data with the following command, it nukes the db data from the previous command:

rake db:dataset:load DATASET=dev

Thus, you can run the following command to add dev data without nuking the existing data:

rake db:dataset:add DATASET=dev

Or if you have dev data first and wants to load db/dataset without nuking db/dataset/dev, you need to run the following:

rake db:dataset:add DATASET=.