artisan migrate grammar error

135 views Asked by At

I am trying to perform artisan migrate. I have installed odbc-driver and connection is set successfully because I can read from db. The problem is that I cant create tables with php artisan migrate. I have enable odbc at php.ini. The error is like below:

{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Ccovey\\ODBCDriver\\Schema\\Grammars\\Sq
lServerGrammar' not found","file":"C:\\wamp\\www\\license3\\vendor\\ccovey\\odbc-driver-l4\\src\\Ccovey\\ODBCDriver\\ODBCDriverConnecti
on.php","line":36}}

this is my ODBCDriverConnection class:

class ODBCDriverConnection extends Connection
{
    /**
     * @return Query\Grammars\Grammar
     */
    protected function getDefaultQueryGrammar()
    {
        $grammarConfig = $this->getGrammarConfig();

        if ($grammarConfig) {
            $packageGrammar = "Ccovey\\ODBCDriver\\Grammars\\" . $grammarConfig;
            if (class_exists($packageGrammar)) {
                return $this->withTablePrefix(new $packageGrammar);
            }

            $illuminateGrammar = "Illuminate\\Database\\Query\\Grammars\\" . $grammarConfig;
            if (class_exists($illuminateGrammar)) {
                return $this->withTablePrefix(new $illuminateGrammar);
            }
        }

        return $this->withTablePrefix(new Grammar);
    }

    /**
     * Default grammar for specified Schema
     * @return Schema\Grammars\Grammar
     */
    protected function getDefaultSchemaGrammar()
    {
        return $this->withTablePrefix(new Schema\Grammars\SqlServerGrammar);
    }

    protected function getGrammarConfig()
    {
        if ($this->getConfig('grammar')) {
            return $this->getConfig('grammar');
        }

        return false;
    }
}
0

There are 0 answers