From 0050a88da2eb416aaa4486a5682807829ada209b Mon Sep 17 00:00:00 2001 From: Adrien POLY Date: Thu, 16 May 2024 07:39:53 +0200 Subject: [PATCH] standardize db naming by envs --- config/database.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/config/database.yml b/config/database.yml index 812ffb24..4bf5ccfb 100644 --- a/config/database.yml +++ b/config/database.yml @@ -9,17 +9,16 @@ default: &default pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 10 } %> timeout: 5000 -development: +# DATABASE CONFIGURATIONS +primary: &primary <<: *default - database: storage/development.sqlite3 + database: storage/<%= Rails.env %>_rubyvideo.sqlite3 + +development: + primary: *primary -# 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: storage/test.sqlite3 + primary: *primary production: - <<: *default - database: storage/production_rubyvideo.sqlite3 + primary: *primary