diff --git a/Gemfile b/Gemfile index 185b97a1..7d8f534b 100644 --- a/Gemfile +++ b/Gemfile @@ -37,7 +37,7 @@ gem 'jemalloc' gem 'customerio' group :development, :test do - gem 'travis-migrations', github: 'travis-ci/travis-migrations' + gem 'travis-migrations', github: 'travis-ci/travis-migrations', branch: 'add_travis_logs_structure' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 76f7f419..574c8ae3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,7 +41,8 @@ GIT GIT remote: git://github.com/travis-ci/travis-migrations.git - revision: dc432e45354287c617c3ae07a72e9e3c4be012cd + revision: cfc5b94d9380d945d42e743beb0bc2433d846c93 + branch: add_travis_logs_structure specs: travis-migrations (0.0.2) diff --git a/README.md b/README.md index 73ee8aae..2a1b412f 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ NB detail for how `rake` sets up the database can be found in the `Rakefile`. In $ RAILS_ENV=development bundle exec rake db:create $ RAILS_ENV=test bundle exec rake db:create ``` -#### Optional +#### Travis Logs DB setup Clone `travis-logs` and copy the `logs` database (assume the PostgreSQL user is `postgres`): ```sh-session $ cd .. diff --git a/Rakefile b/Rakefile index 6e2e2574..3847556b 100644 --- a/Rakefile +++ b/Rakefile @@ -4,7 +4,9 @@ namespace :db do desc "Create and migrate the #{env} database" task :create do sh "createdb travis_#{env}" rescue nil + sh "createdb travis_logs_#{env}" rescue nil sh "psql -q travis_#{env} < #{Gem.loaded_specs['travis-migrations'].full_gem_path}/db/structure.sql" + sh "psql -q travis_#{env} < #{Gem.loaded_specs['travis-migrations'].full_gem_path}/db/travis_logs_structure.sql" end end end