Skip to content

Commit

Permalink
Update example.yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
guvra committed Mar 26, 2024
1 parent 2e5c68d commit 8a82ae5
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions app/config/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,20 @@ database:
password: '%env(DB_PASSWORD)%'
name: '%env(DB_NAME)%'

dump:
output: 'magento2-{Y-m-d H:i:s}.sql.bz2'
compress: 'bzip2'

tables:
# Don't anonymize accounts belonging to the "Acme" company
# Don't anonymize admin accounts belonging to the "Acme" company
admin_user:
skip_conversion_if: 'strpos({{email}}, "@acme.fr") !== false'

# Dump only recent quotes
quote:
filters:
- ['created_at', 'gt', 'expr: date_sub(now(), interval 60 day)']
where: 'created_at > date_sub(now(), interval 60 day)'

# Dump only recent orders or orders with specific emails (this example shows how to implement OR conditions)
# Dump only recent orders
sales_order:
filters:
- ['entity_id', 'in', 'expr: select entity_id from sales_order where updated_at > date_sub(now(), interval 60 day) or email like "%@acme.fr"']

# Dump only CMS pages without "FAQ" in their meta title (COALESCE keeps null values)
cms_page:
filters:
- ["expr: COALESCE(meta_title, '')", 'notLike', '%FAQ%']
where: 'created_at > date_sub(now(), interval 60 day)'

# Anonymize a table named "my_custom_table"
# Anonymize a custom table named "my_custom_table"
my_custom_table:
converters:
email:
Expand Down

0 comments on commit 8a82ae5

Please sign in to comment.