【发布时间】:2014-01-08 15:53:55
【问题描述】:
我通过使用独立的 PHAR 包来使用 Doctrine Migrations。 CLI 似乎对 Mysql 保留关键字进行了故障转移:
./doctrine-migrations migrations:status
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1064 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 'LINES' at line 1
这里我的数据库包含一个名为LINES 的表,它是一个保留关键字。
有没有办法解决这个问题?
【问题讨论】:
-
为什么不改表名?
-
@raygo 我更喜欢 Doctrine Migrations 能够以正确的方式处理保留关键字,而不是重构现有代码以反映表名的变化......
标签: php mysql doctrine-orm doctrine migration