Issue related to Custom Dimensions plugin

We installed Custom Dimensions plugin and activated it using piwik UI. When we try to retrieve data for a particular website we faced this error related to piwik database

Error query: SQLSTATE[42S22]: Column not found: 1054 Unknown error 1054 In query: UPDATE piwik_log_link_visit_action SET time_spent = ? WHERE idlink_va = ? Parameters: array ( 0 => 1, 1 => '', )

When we tried to debug we found out that when this below code is being executed from plugin-CustomDimensions/CustomDimensionsRequestProcessor.php at master · matomo-org/plugin-CustomDimensions · GitHub,
there seems to be an error

if (!empty($lastIdLinkVa) && $timeSpent > 0) {
            $model->updateAction($lastIdLinkVa, array('time_spent' => $timeSpent));
        } 

We assume that code which adds column time_spent to db is not being called successfully and that is why it is throwing error. Can you please provide us the solution to this issue?

Thanks & Regards,