mirror of
https://github.com/openSUSE/osem.git
synced 2026-02-07 20:51:28 -05:00
If we use .env heroku neither sees DATABASE_URL nor config/database.yml and assumes we use postgre. There also is no need to load the rails env in the task.
9 lines
259 B
Ruby
9 lines
259 B
Ruby
namespace :db do
|
|
desc 'setup DATABASE_URL from CLEARDB_DATABASE_URL in config/database.yml'
|
|
task 'cleardb_env' do
|
|
unless ENV['CLEARDB_DATABASE_URL'].nil?
|
|
FileUtils.copy_file('config/database.yml.heroku', 'config/database.yml')
|
|
end
|
|
end
|
|
end
|