Persist THX SSN hash
This commit is contained in:
parent
62ed938d62
commit
9118f4188f
@ -15,6 +15,7 @@ CREATE TABLE IF NOT EXISTS thx (
|
|||||||
summary_risk_score TEXT NULL,
|
summary_risk_score TEXT NULL,
|
||||||
cpu_clock TEXT NULL,
|
cpu_clock TEXT NULL,
|
||||||
true_ip_first_seen TEXT NULL,
|
true_ip_first_seen TEXT NULL,
|
||||||
|
ssn_hash TEXT NULL,
|
||||||
ssn_hash_first_seen TEXT NULL,
|
ssn_hash_first_seen TEXT NULL,
|
||||||
account_email_attributes TEXT NULL,
|
account_email_attributes TEXT NULL,
|
||||||
tps_ip_latitude TEXT NULL,
|
tps_ip_latitude TEXT NULL,
|
||||||
@ -33,6 +34,7 @@ For an existing table, apply the additive migration before deploying the block c
|
|||||||
|
|
||||||
```sql
|
```sql
|
||||||
ALTER TABLE public.thx
|
ALTER TABLE public.thx
|
||||||
|
ADD COLUMN IF NOT EXISTS ssn_hash TEXT NULL,
|
||||||
ADD COLUMN IF NOT EXISTS input_ip_address TEXT NULL;
|
ADD COLUMN IF NOT EXISTS input_ip_address TEXT NULL;
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS idx_thx_input_ip_address
|
CREATE INDEX IF NOT EXISTS idx_thx_input_ip_address
|
||||||
|
|||||||
3
main.sql
3
main.sql
@ -5,6 +5,7 @@ INSERT INTO public.thx (
|
|||||||
summary_risk_score,
|
summary_risk_score,
|
||||||
cpu_clock,
|
cpu_clock,
|
||||||
true_ip_first_seen,
|
true_ip_first_seen,
|
||||||
|
ssn_hash,
|
||||||
ssn_hash_first_seen,
|
ssn_hash_first_seen,
|
||||||
account_email_attributes,
|
account_email_attributes,
|
||||||
tps_ip_latitude,
|
tps_ip_latitude,
|
||||||
@ -20,6 +21,7 @@ VALUES (
|
|||||||
$summary_risk_score,
|
$summary_risk_score,
|
||||||
$cpu_clock,
|
$cpu_clock,
|
||||||
$true_ip_first_seen,
|
$true_ip_first_seen,
|
||||||
|
$input_ssn_hash,
|
||||||
$ssn_hash_first_seen,
|
$ssn_hash_first_seen,
|
||||||
$account_email_attributes,
|
$account_email_attributes,
|
||||||
$tps_ip_latitude,
|
$tps_ip_latitude,
|
||||||
@ -35,6 +37,7 @@ DO UPDATE
|
|||||||
summary_risk_score = EXCLUDED.summary_risk_score,
|
summary_risk_score = EXCLUDED.summary_risk_score,
|
||||||
cpu_clock = EXCLUDED.cpu_clock,
|
cpu_clock = EXCLUDED.cpu_clock,
|
||||||
true_ip_first_seen = EXCLUDED.true_ip_first_seen,
|
true_ip_first_seen = EXCLUDED.true_ip_first_seen,
|
||||||
|
ssn_hash = EXCLUDED.ssn_hash,
|
||||||
ssn_hash_first_seen = EXCLUDED.ssn_hash_first_seen,
|
ssn_hash_first_seen = EXCLUDED.ssn_hash_first_seen,
|
||||||
account_email_attributes = EXCLUDED.account_email_attributes,
|
account_email_attributes = EXCLUDED.account_email_attributes,
|
||||||
tps_ip_latitude = EXCLUDED.tps_ip_latitude,
|
tps_ip_latitude = EXCLUDED.tps_ip_latitude,
|
||||||
|
|||||||
@ -21,6 +21,9 @@
|
|||||||
"true_ip_first_seen": {
|
"true_ip_first_seen": {
|
||||||
"type": ["string", "null"]
|
"type": ["string", "null"]
|
||||||
},
|
},
|
||||||
|
"input_ssn_hash": {
|
||||||
|
"type": ["string", "null"]
|
||||||
|
},
|
||||||
"ssn_hash_first_seen": {
|
"ssn_hash_first_seen": {
|
||||||
"type": ["string", "null"]
|
"type": ["string", "null"]
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user