public function getAddFieldSql($table, $field, $newField, $prevField, $tableSet = null)
    {
        if (!$tableSet) {
            $tableSet = $table;
        }
        $res = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getAll("show create table {$table}");
        $tableSql = $res[0][1];

        // removing comments;
        $tableSql = preg_replace('/COMMENT \\\'.*?\\\'/', '', $tableSql);
        preg_match("/.*,\s+(['`]?" . preg_quote($field, '/') . "['`]?\s+[^,]+),.*/", $tableSql, $match);
        $fieldSql = $match[1];

        $sql = "";
        if (!empty($fieldSql)) {
            $fieldSql = preg_replace("/" . preg_quote($field, '/') . "/", $newField, $fieldSql);
            $sql = "ALTER TABLE `$tableSet` ADD " . $fieldSql;
            if ($this->tableExists($tableSet) && $this->fieldExists($prevField, $tableSet)) {
                $sql .= " AFTER `$prevField`";
            }
        }

        return $sql;
    }