Module: DataMapper::Migrations::SingletonMethods

Defined in:
lib/dm-migrations/auto_migration.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) auto_migrate!(repository_name = nil)

drops and recreates the repository upwards to match model definitions



21
22
23
# File 'lib/dm-migrations/auto_migration.rb', line 21

def auto_migrate!(repository_name = nil)
  repository_execute(:auto_migrate!, repository_name)
end

- (Object) auto_upgrade!(repository_name = nil)



26
27
28
# File 'lib/dm-migrations/auto_migration.rb', line 26

def auto_upgrade!(repository_name = nil)
  repository_execute(:auto_upgrade!, repository_name)
end

- (Object) migrate!(repository_name = nil)

destructively migrates the repository upwards to match model definitions



12
13
14
# File 'lib/dm-migrations/auto_migration.rb', line 12

def migrate!(repository_name = nil)
  repository(repository_name).migrate!
end