You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regexp support checkTablesOnly gives unexpected results as it's not strict per default #17
Not sure if it's just me. But I am using laravel-trigger library that is using your package. And I noticed I got events on tables not listed in my config for tablesOnly.
So i tried to just modify the code to output logs and realized it's due to the regexp not being strict as default.
So the modified version below with log output, gives this result:
To: TRIGGER_TABLES=^af_static$,^af_static_translate$,^af_brands$,^af_brands_images$,^ma_campaigns$,^ma_campaigns_products$,^af_categories$,^af_products_to_manufacturers_models_years$,^af_manufacturers_models$,^af_manufacturers_models_years$,^af_images$,^af_manufacturers$,^language$,^af_product_package$,^af_products$,^af_properties$,^af_properties_option$,^trustpilot_product_review_reviews_log$,^trustpilot_product_review_reviews_summary$,^af_storage$,^af_storage_templates$,^af_translation_new$,^af_products_images_to_products$
But maybe it should be strict per default if there is no regexp pattern in the string?
Again - my issue is resolved but it was a bit surprise so maybe you can consider doing something.
Activity
cyppe commentedon Feb 2, 2024
Worth noting is that also database name is passing through the same method, so if you have for example two databases with names :
per default it will also listen on company_backup if you define "company" as databasesOnly and forget to set it as ^company$
Probably it's a bit more rare case, but just fyi. At least good to document it.