mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
in the migration script add state to the Contact
This commit is contained in:
parent
736aff0fc8
commit
d2b5266887
3 changed files with 33 additions and 30 deletions
|
@ -164,11 +164,11 @@ namespace :import do
|
|||
zip
|
||||
state
|
||||
country_code
|
||||
statuses
|
||||
)
|
||||
|
||||
contacts = []
|
||||
existing_contact_ids = Contact.pluck(:legacy_id)
|
||||
user = "rake-#{`whoami`.strip} #{ARGV.join ' '}"
|
||||
count = 0
|
||||
|
||||
Legacy::Contact.includes(:object_registry, :object, object_registry: :registrar)
|
||||
|
@ -200,7 +200,8 @@ namespace :import do
|
|||
x.city.try(:strip),
|
||||
x.postalcode.try(:strip),
|
||||
x.stateorprovince.try(:strip),
|
||||
x.country.try(:strip)
|
||||
x.country.try(:strip),
|
||||
[x.object_state.try(:name)|| Contact::OK]
|
||||
]
|
||||
|
||||
if contacts.size % 10000 == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue