Skip to content

Instantly share code, notes, and snippets.

View phuongnd08's full-sized avatar

Phuong Nguyen phuongnd08

  • Farmer
  • Ho Chi Minh City
View GitHub Profile
@andyvanee
andyvanee / Rakefile
Created September 21, 2011 16:19
Rake migrate without rails
require 'active_record'
require 'yaml'
require 'mysql'
require 'logger'
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 )