default: &default
  adapter: mysql2
  encoding: utf8mb4
  collation: utf8mb4_unicode_ci
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  host: <%= ENV.fetch("DB_HOST", "127.0.0.1") %>
  username: <%= ENV.fetch("DB_USERNAME", "root") %>
  password: <%= ENV.fetch("DB_PASSWORD", "") %>
  port: <%= ENV.fetch("DB_PORT", "3306") %>

development:
  <<: *default
  database: <%= ENV.fetch("DB_NAME", "wtgs_development") %>

test:
  <<: *default
  database: <%= ENV.fetch("DB_DATABASE", "wtgs_test") %>

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