Return to Snippet

Revision: 2243
at January 22, 2007 09:28 by vanne


Updated Code
namespace :db do
  desc "Returns the current schema version"
  task :version => :environment do
    puts "Current version: " + ActiveRecord::Migrator.current_version.to_s
  end
end

Revision: 2242
at January 22, 2007 09:25 by vanne


Initial Code
namespace :db do
  desc "Returns the current schema version"
  task :version => :environment do
    puts "Current version: " + ActiveRecord::Migrator.current_version.to_s
  end
end

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

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

Initial Title
Grab current db schema using rake

Initial Tags
rails, ruby

Initial Language
Ruby