rap2hpoutre / pg-anonymizer

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

Add `--skip` and `--preserve-null` support. With `chalk` for logging. #40

Closed jackall3n closed 1 year ago

jackall3n commented 1 year ago

Add --skip and --preserve-null support. With chalk for logging.

--skip is used to completely ignore specified tables. It would allow you to have a generic argument like --list name, but also allow you to not affect every table

--preserve-null allows you to specify that the anonymizer only changes values where there is already a value. If NULL is dumped, it is kept.

jackall3n commented 1 year ago

Fixes #34

rap2hpoutre commented 1 year ago

Thank you for your contribution!

I just released a new version that includes your contribution

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 0.7.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

salacr commented 1 year ago

There is probably a bug in this change. I tried version 0.7.0 and encountered an issue:

ERROR: syntax error at or near "List" LINE 1: List: public.message.target_from, public.message.target_to

public.message.target_from, public.message.target_to seams like part of the content of my --configFile which is actually

` public.message.target_from:extension.maskContact public.message.target_to:extension.maskContact

`

after downgrading to 0.6.0 everything works as expected