Client created with same client ID or device token, but under different tenant will update the tenant ID of the client but not delete any associated notifications with the old tenant ID. Notifications are always queried by their tenant ID vs clients are not.
Two solutions:
- Remove tenant_id column from notifications and use the tenant_id column of the clients table (if this is even needed at all)
- Update the tenant_id or delete notifications when the client's tenant_id changes