Fix "php artisan db:table" and "db:show" with MongoDB connection

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

       php artisan db:table 
      
         BadMethodCallException 
      
        Method MongoDB\Laravel\Schema\Grammar::compileTables does not exist.
      
        at vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:115
          111▕      */
          112▕     public function __call($method, $parameters)
          113▕     {
          114▕         if (! static::hasMacro($method)) {
        ➜ 115▕             throw new BadMethodCallException(sprintf(
          116▕                 'Method %s::%s does not exist.', static::class, $method
          117▕             ));
          118▕         }
          119▕ 
      
            +15 vendor frames 
      
      
       php artisan db:show 
      
         Error 
      
        Call to a member function getAttribute() on null
      
        at vendor/laravel/framework/src/Illuminate/Database/Connection.php:1632
          1628▕      * @return string
          1629▕      */
          1630▕     public function getServerVersion(): string
          1631▕     {
        ➜ 1632▕         return $this->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION);
          1633▕     }
          1634▕ 
          1635▕     /**
          1636▕      * Register a connection resolver.
      
            +14 vendor frames 
      

              Assignee:
              Jérôme Tamarelle
              Reporter:
              Jérôme Tamarelle
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: