default: &default
  adapter: postgresql
  encoding: unicode
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 20 } %>
  url: <%= ENV['DATABASE_URL'] %>

development:
  primary:
    <<: *default
    database: identity_vault_development
  analytics:
    <<: *default
    database: identity_vault_analytics_development
    migrations_paths: db/analytics_migrate

test:
  primary:
    <<: *default
    database: identity_vault_test
  analytics:
    <<: *default
    database: identity_vault_analytics_test
    migrations_paths: db/analytics_migrate

production:
  primary:
    <<: *default
    database: identity_vault_prod
  analytics:
    <<: *default
    url: <%= ENV['ANALYTICS_DATABASE_URL'] %>
    database: identity_vault_analytics_prod
    migrations_paths: db/analytics_migrate

staging:
  primary:
    <<: *default
    database: identity_vault_staging
  analytics:
    <<: *default
    url: <%= ENV['ANALYTICS_DATABASE_URL'] %>
    database: identity_vault_analytics_staging
    migrations_paths: db/analytics_migrate
