rosmo / mydumper-anon

Anonymize or modify data on the fly when creating MySQL data dumps using simple YAML configuration file
13 stars 4 forks source link

anonymizer does not work on tinyint colums #7

Open ukirsten opened 7 years ago

ukirsten commented 7 years ago

hello, what a great tool! :smile:

when i define the following yaml the actual value is not empty afterwards. based on my investigation it seems to be related with the tinyint column. i tried also various other syntax for 1 (wrapped as string, as regex pattern etc. pp.) but it seems to never match so value is not emptied

table_name:
     edit:
       - when: {default: 1}
         set: {value: ''}
rosmo commented 7 years ago

Hey Ulf ;)

Can you try this branch: https://github.com/rosmo/mydumper-anon/tree/tinyint-fix

It was indeed ignoring all numbered columns. Can't really remember the reason why that would be necessary, so I removed the check. Now additionally if you try to make a number column an empty string, it will become a NULL value instead.