AgileVentures/osra

What rake db tasks should we use in travis?

Closed this issue · 5 comments

In .travis.yml, should we use:

 - bundle exec rake db:create:all
 - bundle exec rake db:migrate
 - bundle exec rake db:seed

or

   - bundle exec rake db:setup

or

   - bundle exec rake db:schema:load 

Original discussion: #24 (diff)

I do not have a preference. Logically I don't think seed should be used on travis builds.

Loading the schema is much faster than migrating as migrating rebuilds the schema from scratch and loads it into the db while db:schema:load just loads the schema into the database.

So my preference is:

rake db:create
rake db:schema:load

@motasem-salem for the travils file I say drop bundle exec rake db:seed and have

bundle exec rake db:create:all
bundle exec rake db:schema:load

rake db:create # Travis doesn't need ':all', right?
rake db:schema:load

I think we have an agreement here. I'll use

rake db:create
rake db:schema:load

and I will close this question.