Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (23 sloc) 0.704 kb
require "fileutils"
namespace :db do
namespace :use do
desc 'set database.yml to sqlite3'
task :sqlite3 do
file = Rails.root.join('config', 'database.yml')
orig = Rails.root.join('config', 'database.yml.sqlite3')
FileUtils.cp(orig, file)
end
desc 'set database.yml to pg'
task :pg do
file = Rails.root.join('config', 'database.yml')
orig = Rails.root.join('config', 'database.yml.pg')
FileUtils.cp(orig, file)
end
desc 'set database.yml to mysql'
task :mysql do
file = Rails.root.join('config', 'database.yml')
orig = Rails.root.join('config', 'database.yml.mysql')
FileUtils.cp(orig, file)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.