public function revisionLog($action, $table, $id, array $old = [], array $new = [], $user = null)
    {
        $user = $this->parseUser($user);

        $connection = $this->getCurrentConnection();

        $format = $connection->getQueryGrammar()->getDateFormat();

        $connection->table($this->table)->insert([
            'action' => substr($action, 0, 255),
            'table_name' => substr($table, 0, 255),
            'row_id' => substr($id, 0, 255),
            'old' => json_encode($old),
            'new' => json_encode($new),
            'user' => substr($user, 0, 255),
            'ip' => substr($this->getFromServer('REMOTE_ADDR'), 0, 255) ?: null,
            'ip_forwarded' => substr($this->getFromServer('HTTP_X_FORWARDED_FOR'), 0, 255) ?: null,
            'created_at' => (new DateTime())->format($format),
        ]);

        $this->resetConnection();
    }