美文网首页
laravel Doctrine\DBAL\DBALExcept

laravel Doctrine\DBAL\DBALExcept

作者: 程序小白菜 | 来源:发表于2019-02-12 15:52 被阅读0次

    在laravel中用Schema获取数据库表信息时,报错:

    Doctrine\DBAL\DBALException : Unknown database type geometry requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it.

    tips:意思是说Doctrine mysql5.7对geometry数据类型不支持

    解决方法:

    use Illuminate\Support\Facades\Schema;

    $schema = Schema::getConnection()->getDoctrineSchemaManager();

    $schema->getDatabasePlatform()->registerDoctrineTypeMapping('geometry', 'string');

    相关文章

      网友评论

          本文标题:laravel Doctrine\DBAL\DBALExcept

          本文链接:https://www.haomeiwen.com/subject/oejkeqtx.html