tasks/db.rake in pact_broker-2.0.0.beta.6 vs tasks/db.rake in pact_broker-2.0.0.beta.7
- old
+ new
@@ -24,11 +24,12 @@
task :version => 'db:env' do
puts "Schema Version: #{PactBroker::Database.version}"
end
desc 'Migrate the Database'
- task :migrate => 'db:env' do
- PactBroker::Database.migrate
+ task :migrate, [:target] => 'db:env' do |t, args|
+ target = args[:target] ? args[:target].to_i : nil
+ PactBroker::Database.migrate(target)
end
desc 'Rollback database to specified version'
task :rollback, [:target] => 'db:env' do |t, args|
args.with_defaults(target: 0)