This commit is contained in:
James Mason 2018-09-27 15:49:51 +00:00 committed by GitHub
commit 7526f4b11c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,13 @@
if ENV['OSEM_DB_ADAPTER'] == 'mysql2' if ENV['OSEM_DB_ADAPTER'] == 'mysql2'
encoding = 'utf8' encoding = 'utf8'
end end
development_database = ENV['OSEM_DB_NAME'] || 'osem_development'
test_database = ENV['OSEM_DB_NAME'] || 'osem_test'
if ENV['OSEM_DB_ADAPTER'] == 'sqlite3'
development_database = "db/#{development_database}.sqlite3"
test_database = "db/#{test_database}.sqlite3"
end
%> %>
@ -19,14 +26,14 @@ default: &default
development: development:
<<: *default <<: *default
database: osem_development database: <%= development_database %>
# Warning: The database defined as "test" will be erased and # Warning: The database defined as "test" will be erased and
# re-generated when you run "rake". # re-generated when you run "rake".
# Do not set this db to the same as development or production. # Do not set this db to the same as development or production.
test: test:
<<: *default <<: *default
database: osem_test database: <%= test_database %>
production: production:
<<: *default <<: *default