public function prefixColumn($column)
    {
        $table_names = $this->tableNames();
        if (count(
                        array_filter($table_names, function ($value) use (&$column) {
                            return strpos($column, $value . '.') === 0;
                        })
                )) {
            // the column starts with one of the table names
            $column = $this->prefix . $column;
        }

        return $column;
    }