Class: MergeDb::Merger
- Inherits:
-
Object
- Object
- MergeDb::Merger
- Defined in:
- lib/merge_db/merger.rb
Instance Method Summary collapse
-
#initialize(params) ⇒ Merger
constructor
A new instance of Merger.
- #merge ⇒ Object
- #prepare ⇒ Object
- #restore_associations ⇒ Object
Constructor Details
#initialize(params) ⇒ Merger
Returns a new instance of Merger.
10 11 12 13 |
# File 'lib/merge_db/merger.rb', line 10 def initialize(params) @source_name = params[:source] @target_name = params[:target] end |
Instance Method Details
#merge ⇒ Object
19 20 21 22 23 24 |
# File 'lib/merge_db/merger.rb', line 19 def merge add_db_to_scope copy_data_from_source_to_target restore_association_references clean_backedup_primary_keys end |
#prepare ⇒ Object
15 16 17 |
# File 'lib/merge_db/merger.rb', line 15 def prepare prepare_tables_in_target end |
#restore_associations ⇒ Object
26 27 28 29 |
# File 'lib/merge_db/merger.rb', line 26 def restore_associations restore_association_references clean_backedup_primary_keys end |