aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 22:12:10 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 22:12:10 +0000
commit35e382627ec4b6d0aaf14f831adc104d353163a9 (patch)
tree890f57a7a05e5dac586b2e6d9fa28fdb821d4e2b /railties
parent1d4002d462a89ee08e3523f1f08d40b7192d4352 (diff)
downloadrails-35e382627ec4b6d0aaf14f831adc104d353163a9.tar.gz
rails-35e382627ec4b6d0aaf14f831adc104d353163a9.tar.bz2
rails-35e382627ec4b6d0aaf14f831adc104d353163a9.zip
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
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/tasks/databases.rake5
2 files changed, 7 insertions, 0 deletions
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