example/rails/config/database.yml
default: &default
adapter: spanner
instance: <%= ENV.fetch("SPANNER_INSTANCE") %>
database: <%= ENV.fetch("SPANNER_DATABASE", "my-app") %>
project: <%= ENV.fetch("SPANNER_EMULATOR_HOST", nil) ? "my-project" : "null" %>
development:
<<: *default
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: <%= ENV.fetch("SPANNER_DATABASE", "my-app") %>-test
production:
<<: *default