common: &common
  # DATABASE_URL: postgres://<%= ENV.fetch('RAILS_DB_NAME_PROD', 'postgres') %>:<%= ENV.fetch('RAILS_DB_PASS', 'sekret') %>@<%= ENV.fetch('RAILS_DB_HOST', 'postgres') %>/canvas_<%= ENV.fetch('RAILS_ENV') %>
  adapter: postgresql
  host: <%= ENV.fetch('RAILS_DB_HOST', 'postgres') %>
  username: postgres
  password: <%= ENV.fetch('RAILS_DB_PASS', 'sekret') %>
  encoding: utf8
  timeout: 5000
  prepared_statements: false
  use_qualified_names: true
  shard_name: public
  schema_search_path: "''"

development:
  <<: *common
  database: <%= ENV.fetch('RAILS_DB_NAME_DEV', 'canvas_development') %>

test:
  <<: *common
  database: <%= ENV.fetch('RAILS_DB_NAME_TEST', 'canvas_test') %>
  shard1: canvas_test_shard_1
  shard2: canvas_test_shard_2
  test_shard_1: canvas_test_shard_1
  test_shard_2: canvas_test_shard_2

production:
  <<: *common
  database: <%= ENV.fetch('RAILS_DB_NAME_PROD', 'canvas_production') %>
