diff --git a/.travis.yml b/.travis.yml index dc829fd54..b2e46256f 100755 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,9 @@ install: - cp db/schema.rb.example db/schema.rb - ./lib/exporter-deps.sh > /dev/null 2>&1 - bundle install && yarn install + - mysql -e "CREATE DATABASE mapknitter; CREATE DATABASE mapknitter_test;" - if [ $RAILS_ENV == 'production' ]; then - bundle exec rake db:create; + bundle exec rake db:schema:load; else bundle exec rake db:setup || bundle exec rake db:migrate; fi diff --git a/config/database.yml.example b/config/database.yml.example index 36f04f5ba..f4b84d743 100644 --- a/config/database.yml.example +++ b/config/database.yml.example @@ -1,12 +1,13 @@ default: &default encoding: utf8 adapter: mysql2 + host: 127.0.0.1 development: <<: *default username: password: - database: mapknitter-dev + database: mapknitter_dev production: <<: *default @@ -16,5 +17,6 @@ production: test: <<: *default - username: root - database: mapknitter-test + username: + password: + database: mapknitter_test