table = $wpdb->prefix . 'mailpoet_automation_workflow_runs'; $this->wpdb = $wpdb; } public function createWorkflowRun(WorkflowRun $workflowRun): int { $result = $this->wpdb->insert($this->table, $workflowRun->toArray()); if ($result === false) { throw Exceptions::databaseError($this->wpdb->last_error); } return $this->wpdb->insert_id; } }