zenstruck / messenger-monitor-bundle

Batteries included UI to monitor your Messenger workers, transports, schedules, and messages.
MIT License
153 stars 16 forks source link

fix: Filter with excluded tag ignores rows with tag = NULL #69

Closed dontfreakout closed 8 months ago

dontfreakout commented 8 months ago

This will fix the query with excluded tags. As MariaDB and MySQL ignore null values when using NOT LIKE it needs to be added OR IS NULL to select the correct rows.

Before:

SELECT * FROM processed_messages m 
WHERE m.tags NOT LIKE '%schedule%'

image

After fix:

SELECT * FROM processed_messages m 
WHERE (m.tags NOT LIKE '%schedule%' OR m.tags IS NULL)

image

PS: Sorry for my PR spamming :rofl: This one is last for now.