lib/tasks/cloudfuji.rake in errbit_cloudfuji-0.2.0 vs lib/tasks/cloudfuji.rake in errbit_cloudfuji-0.2.1
- old
+ new
@@ -17,5 +17,13 @@
Rake::Task['db:seed'].invoke
puts "\n"
Rake::Task['db:mongoid:create_indexes'].invoke
end
end
+
+namespace :db do
+ desc "Migrate errbit_cloudfuji"
+ task :migrate => :environment do
+ Mongoid::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
+ Mongoid::Migrator.migrate(File.expand_path("../../../db/migrate/", __FILE__), ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
+ end
+end