0
,當我在一個symfony項目運行php app/console doctrine:schema:update --force
我有一個錯誤,我得到以下錯誤:「PHP應用程序/控制檯學說:架構:更新--force」給出了一個語法錯誤
[Doctrine\DBAL\DBALException]
An exception occurred while executing 'DROP INDEX idx-id ON extra':
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-id ON extra' at line 1
[Doctrine\DBAL\Driver\Mysqli\MysqliException]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-id ON extra' at line 1
這是生成的SQL給出了錯誤:
DROP INDEX idx-id ON extra
錯誤是索引名不包裹「`」, 我怎麼能得到它,因此指數名稱始終包裹着「`」?