Skip to content

Commit bef09c0

Browse files
committed
Fix obfuscation
1 parent e56645b commit bef09c0

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

bin/migrate-nris-data/ce_files/sql/obfuscate_update.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
update
22
alcs.compliance_and_enforcement as ace
33
set
4-
intake_notes = v.intake_notes
4+
intake_notes = case
5+
when ace.intake_notes <> '' then v.intake_notes
6+
else ace.intake_notes
7+
end
58
from
69
(values %s) as v(uuid, intake_notes)
710
where

bin/migrate-nris-data/submitters/sql/obfuscate_update.sql

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
update
22
alcs.compliance_and_enforcement_submitter as aces
33
set
4-
name = v.name,
5-
email = v.email,
6-
telephone_number = v.telephone_number,
7-
affiliation = v.affiliation,
8-
additional_contact_information = v.additional_contact_information
4+
name = case
5+
when aces.name <> '' then v.name
6+
else aces.name
7+
end,
8+
email = case
9+
when aces.email <> '' then v.email
10+
else aces.email
11+
end,
12+
telephone_number = case
13+
when aces.telephone_number <> '' then v.telephone_number
14+
else aces.telephone_number
15+
end,
16+
affiliation = case
17+
when aces.affiliation <> '' then v.affiliation
18+
else aces.affiliation
19+
end,
20+
additional_contact_information = case
21+
when aces.additional_contact_information <> '' then v.additional_contact_information
22+
else aces.additional_contact_information
23+
end
924
from
1025
(values %s) as v(
1126
uuid,

0 commit comments

Comments
 (0)