Module: CheckedTypes::SingletonMethods
- Defined in:
- lib/dm-checked-types/migrations.rb
Class Method Summary collapse
Instance Method Summary collapse
- #auto_migrate_down_with_custom_types!(repository_name = nil) ⇒ Object
- #auto_migrate_up_with_custom_types!(repository_name = nil) ⇒ Object
Class Method Details
.included(base) ⇒ Object
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/dm-checked-types/migrations.rb', line 54 def self.included(base) # TODO: figure out how to make this work without AMC base.class_eval <<-RUBY, __FILE__, __LINE__ + 1 alias_method :auto_migrate_down_without_custom_types!, :auto_migrate_down! alias_method :auto_migrate_down!, :auto_migrate_down_with_custom_types! alias_method :auto_migrate_up_without_custom_types!, :auto_migrate_up! alias_method :auto_migrate_up!, :auto_migrate_up_with_custom_types! RUBY end |
Instance Method Details
#auto_migrate_down_with_custom_types!(repository_name = nil) ⇒ Object
65 66 67 68 |
# File 'lib/dm-checked-types/migrations.rb', line 65 def auto_migrate_down_with_custom_types!(repository_name = nil) repository_execute(:auto_migrate_down_with_custom_types!, repository_name) auto_migrate_down_without_custom_types!(repository_name) end |
#auto_migrate_up_with_custom_types!(repository_name = nil) ⇒ Object
70 71 72 73 |
# File 'lib/dm-checked-types/migrations.rb', line 70 def auto_migrate_up_with_custom_types!(repository_name = nil) auto_migrate_up_without_custom_types!(repository_name) repository_execute(:auto_migrate_up_with_custom_types!, repository_name) end |