default: &default
  host: <%= Rails.application.secrets[:database][:host] %>
  adapter: postgresql
  encoding: UTF8
  database: <%= Rails.application.secrets[:database][:name] %>
  pool: 10
  reaping_frequency: 30
  username: <%= Rails.application.secrets[:database][:username] %>
  password: <%= Rails.application.secrets[:database][:password] %>

development: *default
test: *default
production: *default
  database: <%= ENV['DATABASE_URL'] %>

default: &default
  host: <%= Rails.application.secrets[:database][:host] %>
  adapter: postgresql
  encoding: UTF8
  database: <%= Rails.application.secrets[:database][:name] %>
  pool: 10
  reaping_frequency: 30

development: *default
  username: <%= Rails.application.secrets[:database][:username] %>
  password: <%= Rails.application.secrets[:database][:password] %>

test: *default
  username: <%= Rails.application.secrets[:database][:username] %>
  password: <%= Rails.application.secrets[:database][:password] %>

production: *default
  database: <%= ENV['DATABASE_URL'] %>

Move username and password to avoid production conflict
Move username and password to avoid production conflict
