Module: Orange::Mixins::DBLoader

Defined in:
lib/orange-core/middleware/database.rb

Instance Method Summary collapse

Instance Method Details

#load_db!(url) ⇒ Object



37
38
39
# File 'lib/orange-core/middleware/database.rb', line 37

def load_db!(url)
  DataMapper.setup(:default, url)
end

#migrate_db!Object



41
42
43
# File 'lib/orange-core/middleware/database.rb', line 41

def migrate_db!
  DataMapper.auto_migrate!
end

#upgrade_db!Object



45
46
47
# File 'lib/orange-core/middleware/database.rb', line 45

def upgrade_db!
  DataMapper.auto_upgrade!
end