mysql2: &mysql2
  adapter: mysql2
  encoding: utf8


development: &development
  <<: *mysql2
  host: <%= ENV['ROOMS_DB_HOST'] %>
  database: <%= ENV['ROOMS_DB_DATABASE'] %>
  username: <%= ENV['ROOMS_DB_USER'] %>
  password: <%= ENV['ROOMS_DB_PASSWORD'] %>

test:
  <<: *development

qa:
  <<: *development

staging:
  <<: *development

production:
  <<: *development

mysql2: &mysql2
  adapter: mysql2
  encoding: utf8


development: &development
  <<: *mysql2
  host: <%= ENV['ROOMS_DB_HOST'] %>
  database: <%= ENV['ROOMS_DB_DATABASE'] %>
  username: <%= ENV['ROOMS_DB_USER'] %>
  password: <%= ENV['ROOMS_DB_PASSWORD'] %>

test:
  <<: *development
  host: <%= ENV['ROOMS_DB_HOST'] %>
  database: <%= ENV['ROOMS_DB_DATABASE'] %>
  username: <%= (ENV['ROOMS_DB_USER'] || ENV['JENKINS_DB_USER'] || 'root') %>
  password: <%= (ENV['ROOMS_DB_PASSWORD'] || ENV['JENKINS_DB_PASSWORD'] || '') %>

qa:
  <<: *development

staging:
  <<: *development

production:
  <<: *development

Use local db for test
Use local db for test
