Posted By

vanne on 01/22/07


Tagged

rails ruby rake


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

maxkks
webstic


Grab current db schema using rake


 / Published in: Ruby
 

URL: http://jayfields.blogspot.com/2006/11/rails-get-schemainfo-version-number.html

put this into lib/tasks and then run rake db:version

  1. namespace :db do
  2. desc "Returns the current schema version"
  3. task :version => :environment do
  4. puts "Current version: " + ActiveRecord::Migrator.current_version.to_s
  5. end
  6. end

Report this snippet  

You need to login to post a comment.