sbtodd wrote:
> How do you migrate a schema when using DataMapper in Sinatra
> environment?
>   
You can paste the automigrate task of Merb:


  desc "Perform automigration"
  task :automigrate => :merb_env do
    ::DataMapper::AutoMigrator.auto_migrate
  end
  desc "Perform non destructive automigration"
  task :autoupgrade => :merb_env do
    ::DataMapper::AutoMigrator.auto_upgrade
  end

Just use the auto_upgrade and auto_migrate class method

-- 
Cyril Mougel
http://blog.shingara.fr


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to