Class: Backup::LoadFromFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/backup/load_from_files.rb

Defined Under Namespace

Classes: DataFile, EntryFile, JsonContent, RelationshipFile

Instance Method Summary collapse

Constructor Details

#initialize(config, dry_run_reporter = nil) ⇒ LoadFromFiles

Returns a new instance of LoadFromFiles.



55
56
57
58
59
# File 'lib/backup/load_from_files.rb', line 55

def initialize(config, dry_run_reporter=nil)
  @config = config
  @dry_run_reporter = dry_run_reporter
  @touched_models = []
end

Instance Method Details

#runObject



61
62
63
64
65
66
67
# File 'lib/backup/load_from_files.rb', line 61

def run
  set_id_offsets
  load_data_with_offsets
  cancel_offset_for_foreign_data
  set_id_sequences
  load_nullified_relationships
end