aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
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