Module: DataMapper::Repository::Migration

Included in:
DataMapper::Repository
Defined in:
lib/dm-core/repository.rb

Overview

TODO: move to dm-more/dm-migrations

Instance Method Summary collapse

Instance Method Details

#auto_migrate!Object

TODO: move to dm-more/dm-migrations



130
131
132
# File 'lib/dm-core/repository.rb', line 130

def auto_migrate!
  AutoMigrator.auto_migrate(name)
end

#auto_upgrade!Object

TODO: move to dm-more/dm-migrations



135
136
137
# File 'lib/dm-core/repository.rb', line 135

def auto_upgrade!
  AutoMigrator.auto_upgrade(name)
end

#map(*args) ⇒ Object

TODO: move to dm-more/dm-migrations



106
107
108
# File 'lib/dm-core/repository.rb', line 106

def map(*args)
  type_map.map(*args)
end

#migrate!Object

TODO: move to dm-more/dm-migrations



125
126
127
# File 'lib/dm-core/repository.rb', line 125

def migrate!
  Migrator.migrate(name)
end

#storage_exists?(storage_name) ⇒ True, False

TODO: move to dm-more/dm-migrations

Returns:

  • (True, False)

    whether or not the data-store exists for this repo



120
121
122
# File 'lib/dm-core/repository.rb', line 120

def storage_exists?(storage_name)
  adapter.storage_exists?(storage_name)
end

#type_mapObject

TODO: move to dm-more/dm-migrations



111
112
113
# File 'lib/dm-core/repository.rb', line 111

def type_map
  @type_map ||= TypeMap.new(adapter.class.type_map)
end