rap2hpoutre / pg-anonymizer

Dump anonymized PostgreSQL database with a NodeJS CLI
https://raph.site
MIT License
223 stars 31 forks source link

Pass table name to extension functions #8

Closed kfranqueiro closed 2 years ago

kfranqueiro commented 2 years ago

I have a use case where multiple tables have a name field, but only one of them refers to PII that needs to be scrubbed, while the other tables should remain intact.

Currently there's no way to disambiguate which table we're working with. This PR would pass the table name as an additional argument to extension functions so that they can make smarter decisions about how/if to anonymize.

Open to other ideas here; I figured this way wouldn't cause any breaking changes.

imreFitos commented 2 years ago

Does something hold back this PR that I can help with?

rap2hpoutre commented 2 years ago

Thank you for your contribution @kfranqueiro and sorry for late answer (cc @imreFitos) 🙏