makinacorpus / DbToolsBundle

A PHP library to backup, restore and anonymize databases
https://dbtoolsbundle.readthedocs.io
MIT License
181 stars 15 forks source link

no issue - configuration changes and old names deprecation #191

Closed pounard closed 1 day ago

pounard commented 1 week ago

Variant of https://github.com/makinacorpus/DbToolsBundle/pull/162

SimonMellerin commented 6 days ago

Just may be you can update sample config file to put at the top of the file config that users will want to edit the most.

Like connections and anonymization, like all other have default values.

But, not sure about that, I let you choose if this is a good idea or not !

SimonMellerin commented 1 day ago

May be for the standalone version, we can simplify the anonymization declaration like this:

    my_table: 
        my_email_column: email
        my_age_column: 
            anonymizer: integer
            options: {delta: 15}
    my_table_2:
        my_firstname_column: firstname

# Or with a yaml 
anonymization: ./db_tools.anonymization.yaml

# Or multiconneciton 
anonymization: 
    connection_one: 
        my_table: 
            my_email_column: email
            my_age_column: 
                anonymizer: integer
                options: {delta: 15}
        my_table_2:
            my_firstname_column: firstname
    connection_two: 
        my_table: 
            my_email_column: email
            my_age_column: 
                anonymizer: integer
                options: {delta: 15}
        my_table_2:
            my_firstname_column: firstname

# Or multiconneciton yaml
anonymization: 
    connection_one: ./db_tools.anonymization.connection_one.yaml
    connection_two: ./db_tools.anonymization.connection_one.yaml

Seems easier to understand and to use

pounard commented 1 day ago

Failure was a random MySQL float error, I merged anyway.