about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authormasarakki <masaki182@gmail.com>2017-10-17 18:45:37 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-10-17 11:45:37 +0200
commit0e0c6b1b4bea4a45e8a19eac00c2f2d48681257c (patch)
treeca9e03f4b69f6c0e54c1eb9cb76a03304d2f6d79 /config
parent554c2fd8af79c173e81d7193ea649fa848076123 (diff)
use-DB_NAME-in-development (#5430)
Diffstat (limited to 'config')
-rw-r--r--config/database.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/database.yml b/config/database.yml
index f74635a36..82e560515 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -6,7 +6,7 @@ default: &default
 
 development:
   <<: *default
-  database: mastodon_development
+  database: <%= ENV['DB_NAME'] || 'mastodon_development' %>
   username: <%= ENV['DB_USER'] %>
   password: <%= ENV['DB_PASS'] %>
   host: <%= ENV['DB_HOST'] %>
@@ -17,7 +17,7 @@ development:
 # Do not set this db to the same as development or production.
 test:
   <<: *default
-  database: mastodon_test<%= ENV['TEST_ENV_NUMBER'] %>
+  database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %>
   username: <%= ENV['DB_USER'] %>
   password: <%= ENV['DB_PASS'] %>
   host: <%= ENV['DB_HOST'] %>