mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Story#108521790 - rm old comment how to import history
This commit is contained in:
parent
057e699272
commit
91da4db2ce
1 changed files with 0 additions and 20 deletions
|
@ -817,26 +817,6 @@ namespace :import do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Domain.where.not(legacy_id: nil).find_each do |domain|
|
|
||||||
# next if domain.versions.where(action: :create).any?
|
|
||||||
#
|
|
||||||
# history = Legacy::DomainHistory.where(id: domain.legacy_id).order("valid_from ASC").to_a
|
|
||||||
# history.each_with_index do |his, i|
|
|
||||||
# event = :update
|
|
||||||
# event = :create if i == 0
|
|
||||||
# event = :destroy if i + 1 == history.size && his.history.valid_to.present?
|
|
||||||
#
|
|
||||||
# {
|
|
||||||
# item_type: domain.class,
|
|
||||||
# item_id: domain.id,
|
|
||||||
# event: event,
|
|
||||||
# whodunnit: Registrar.find_by(legacy_id: his.object_history.upid || his.object_history.clid),
|
|
||||||
# object: {},
|
|
||||||
# object_changes: {"id" => [nil, 1111] },
|
|
||||||
# created_at: his.object_history.try(:update),
|
|
||||||
# }
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue