From 35e382627ec4b6d0aaf14f831adc104d353163a9 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 22 Sep 2007 22:12:10 +0000 Subject: Added rake db:version to get the current schema version from the command line (closes #7521) [pelargir] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/lib/tasks/databases.rake | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index ea92fa04b3..09a5e9fb2f 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added rake db:version to get the current schema version from the command line #7521 [pelargir] + * Fixed the placement of fixture files for nested models when generating through script/generate model #7547 [jkit] * Added TEMPLATE option to rake doc:app to set a custom output template #7737 [Jakob S] diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 3bc4b04ae1..12a525d4de 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -99,6 +99,11 @@ namespace :db do puts "Current version: #{ActiveRecord::Migrator.current_version}" end + desc "Print the current database migration version to the console" + task :version => :environment do + puts "VERSION=#{ActiveRecord::Migrator.current_version}" + end + namespace :fixtures do desc "Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y" task :load => :environment do -- cgit v1.2.3