首页 > 解决方案 > 平台不支持 Doctrine getSequenceNextValSQL?

问题描述

我有一个将数据插入数据库的功能。当我通过浏览器运行时,它工作正常。但是当我从命令运行时,它给了我以下错误:

 at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:39
 Exception trace:
 
    is not supported by platform.                                               
   Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL'  
   [Doctrine\DBAL\Exception]    

                   

我有以下命令要执行:

受保护的静态 $defaultName = 'app:import:data';

protected function execute(InputInterface $input, OutputInterface $output): int
{
    $io = new SymfonyStyle($input, $output);
    $this->importer->import('test');
    $io->success('EOF');

    return 0;

}                       

这些是我使用过的依赖项:

    "beberlei/doctrineextensions": "^1.3",
    "doctrine/annotations": "^1.0",
    "doctrine/doctrine-bundle": "*",
    "doctrine/doctrine-migrations-bundle": "^3.0",
    "doctrine/orm": "2.8.1",

标签: doctrine-ormmariadbsymfony4

解决方案


推荐阅读