Skip to content

Instantly share code, notes, and snippets.

@ku1ik
Created June 6, 2010 08:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ku1ik/427416 to your computer and use it in GitHub Desktop.
require "bundler"
Bundler.setup
require "dm-core"
require "dm-migrations"
DataMapper.setup(:default, "mysql://localhost/test")
DataMapper.setup(:logs, "mongo://localhost/test")
class User
include DataMapper::Resource
property :id, Serial
end
class LoggedEvent
include DataMapper::Mongo::Resource
def self.default_repository_name; :logs; end
property :id, ObjectID
end
DataMapper.auto_migrate!(:default) # BOOM!
DataMapper.auto_migrate!(:logs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment