Affects Version/s: 2.0.5
Fix Version/s: None
I have an entity "User" in D2-ORM which works fine on MySQL. However, when I tried to create the schema on PostgreSQL 9.0, it failed with the following error:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE: Syntax error: 7 ERROR: syntax error at or near "User"
LINE 1: CREATE TABLE User (id INT NOT NULL, username VARCHAR(50) NOT...
^' in /usr/share/php/Doctrine/DBAL/Connection.php:577
The generated statement caused this was: CREATE TABLE User (id INT NOT NULL, username VARCHAR(50) NOT NULL, password VARCHAR(32) NOT NULL, admin BOOLEAN NOT NULL, PRIMARY KEY(id))
"User" needs to be quoted in order to work (I tested against PostgreSQL 9.0).