Thanks! I found the following comment from this article: http://blog.zerosum.org/2008/7/2/clone-pastie-with-sinatra-datamapper-redux
We do this by using the DataMapper.auto_upgrade! method, which checks to see if the database table that corresponds to our model(s) need upgrading and then creates or updates them as appropriate. It's a non- destructive way to do auto-migrations (the destructive equivalent is auto_migrate!) On Mar 4, 12:47 am, Cyril Mougel <[email protected]> wrote: > 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 Mougelhttp://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 -~----------~----~----~----~------~----~------~--~---
