Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (14 sloc) 0.458 kB
require 'active_record'
require 'yaml'
task :default => :migrate
desc "Migrate the database through scripts in db/migrate. " \
"Target specific version with VERSION=x"
task :migrate => :environment do
ActiveRecord::Migrator.migrate('db/migrate',
ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
end
task :environment do
ActiveRecord::Base.establish_connection(
YAML::load(File.open('config/database.yml'))
)
end
Jump to Line
Something went wrong with that request. Please try again.