Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bin/migrate-nris-data/ce_files/sql/obfuscate_update.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
update
alcs.compliance_and_enforcement as ace
set
intake_notes = v.intake_notes
intake_notes = case
when ace.intake_notes <> '' then v.intake_notes
else ace.intake_notes
end
from
(values %s) as v(uuid, intake_notes)
where
Expand Down
25 changes: 20 additions & 5 deletions bin/migrate-nris-data/submitters/sql/obfuscate_update.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
update
alcs.compliance_and_enforcement_submitter as aces
set
name = v.name,
email = v.email,
telephone_number = v.telephone_number,
affiliation = v.affiliation,
additional_contact_information = v.additional_contact_information
name = case
when aces.name <> '' then v.name
else aces.name
end,
email = case
when aces.email <> '' then v.email
else aces.email
end,
telephone_number = case
when aces.telephone_number <> '' then v.telephone_number
else aces.telephone_number
end,
affiliation = case
when aces.affiliation <> '' then v.affiliation
else aces.affiliation
end,
additional_contact_information = case
when aces.additional_contact_information <> '' then v.additional_contact_information
else aces.additional_contact_information
end
from
(values %s) as v(
uuid,
Expand Down