lib/merb_datamapper/merbtasks.rb in merb_datamapper-1.0.12 vs lib/merb_datamapper/merbtasks.rb in merb_datamapper-1.0.13

- old
+ new

@@ -14,21 +14,20 @@ target_location = Merb.dir_for(:config) FileUtils.cp sample_location, target_location end desc "Perform automigration" task :automigrate => :merb_env do - ::DataMapper::AutoMigrator.auto_migrate + ::DataMapper.auto_migrate! end desc "Perform non destructive automigration" task :autoupgrade => :merb_env do - ::DataMapper::AutoMigrator.auto_upgrade + ::DataMapper.auto_upgrade! end namespace :migrate do task :load => :merb_env do - gem 'dm-migrations' - require 'migration_runner' + require 'dm-migrations/migration_runner' FileList["schema/migrations/*.rb"].each do |migration| load migration end end @@ -64,10 +63,10 @@ end desc "Drop the database (postgres only)" task :drop do config = Merb::Orms::DataMapper.config - puts "Droping database '#{config[:database]}'" + puts "Dropping database '#{config[:database]}'" case config[:adapter] when 'postgres' `dropdb -U #{config[:username]} #{config[:database]}` else raise "Adapter #{config[:adapter]} not supported for dropping databases yet.\ntry db:automigrate"