Skip to content

Instantly share code, notes, and snippets.

@BanzaiMan
Last active August 29, 2015 14:28
Show Gist options
  • Save BanzaiMan/fbae2308673193ba3b24 to your computer and use it in GitHub Desktop.
Save BanzaiMan/fbae2308673193ba3b24 to your computer and use it in GitHub Desktop.

Database setup

  1. First, clone travis-ci into the same directory as travis-api:

    $ git clone https://github.com/travis-ci/travis-api.git
    
  2. Next, creat symbolic link travis-api/db pointing to travis-core/db:

    $ ln -s travis-core/db travis-api/db
    
  3. Run Rake tasks

    bundle exec rake db:create db:structure:load
    
  4. Clone travis-logs and copy the logs database (assume the PostgreSQL user is postgres):

    cd ..
    git clone https://github.com/travis-ci/travis-logs.git
    cd travis-logs
    rvm jruby do bundle exec rake db:migrate # `travis-logs` requires JRuby
    psql -c "DROP TABLE IF EXISTS logs CASCADE" -U postgres travis_development
    pg_dump -t logs travis_logs_development | psql -U postgres travis_development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment