Module: DataMapper::Migrations

Defined in:
lib/dm-migrations/auto_migration.rb,
lib/dm-migrations/adapters/dm-do-adapter.rb,
lib/dm-migrations/adapters/dm-yaml-adapter.rb,
lib/dm-migrations/adapters/dm-mysql-adapter.rb,
lib/dm-migrations/adapters/dm-oracle-adapter.rb,
lib/dm-migrations/adapters/dm-sqlite-adapter.rb,
lib/dm-migrations/adapters/dm-postgres-adapter.rb,
lib/dm-migrations/adapters/dm-sqlserver-adapter.rb

Defined Under Namespace

Modules: DataObjectsAdapter, Model, MysqlAdapter, OracleAdapter, PostgresAdapter, Repository, SingletonMethods, SqliteAdapter, SqlserverAdapter, YamlAdapter

Class Method Summary collapse

Class Method Details

.include_migration_apiObject

module Model



183
184
185
186
187
188
189
190
191
192
# File 'lib/dm-migrations/auto_migration.rb', line 183

def self.include_migration_api
  DataMapper.extend(SingletonMethods)
  [ :Repository, :Model ].each do |name|
    DataMapper.const_get(name).send(:include, const_get(name))
  end
  DataMapper::Model.append_extensions(Model)
  Adapters::AbstractAdapter.descendants.each do |adapter_class|
    Adapters.include_migration_api(ActiveSupport::Inflector.demodulize(adapter_class.name))
  end
end