Skip to content
Browse files

Makes DataMapper.auto_migrate_down!/up! @api semipublic

These methods need to be overwritten in dm-constraints
to perform down/up migration of foreign key constraints
  • Loading branch information...
1 parent 553049f commit 5eadfc4c598b6a0234c320f0a5970fc3c0212f01 @snusnu snusnu committed May 4, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/dm-migrations/auto_migration.rb
View
8 lib/dm-migrations/auto_migration.rb
@@ -27,14 +27,14 @@ def auto_upgrade!(repository_name = nil)
repository_execute(:auto_upgrade!, repository_name)
end
- private
+ private
- # @api private
+ # @api semipublic
def auto_migrate_down!(repository_name)
repository_execute(:auto_migrate_down!, repository_name)
end
- # @api private
+ # @api semipublic
def auto_migrate_up!(repository_name)
repository_execute(:auto_migrate_up!, repository_name)
end
@@ -107,6 +107,7 @@ def auto_upgrade!
end # module Repository
module Model
+
# @api private
def self.included(mod)
mod.descendants.each { |model| model.extend self }
@@ -176,6 +177,7 @@ def auto_migrate_up!(repository_name = self.repository_name)
base_model.auto_migrate_up!(repository_name)
end
end
+
end # module Model
def self.include_migration_api

0 comments on commit 5eadfc4

Please sign in to comment.
Something went wrong with that request. Please try again.