Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Component/s: Schema Managers
-
Labels:None
-
Environment:CentOs 5.5, Postgres 8.1.22
Description
While execuiting
doctrine orm:convert-mapping --from-database yml /tmp/test.yml
I get presented an error
[Doctrine\DBAL\Schema\SchemaException]
Invalid index-name tablename_"input"_idx given, has to be [a-zA-Z0-9_]
The index "type" is quoted because this is a reserved word in Postgres. for example see the following definition:
FOREIGN KEY (something) REFERENCES somethings(id) ON UPDATE CASCADE
FOREIGN KEY (another) REFERENCES anothers(id) ON UPDATE CASCADE
FOREIGN KEY ("type") REFERENCES logtypes(id) ON UPDATE CASCADE
Only type will be quoted because it is a reserved word.
Issue Links
- is duplicated by
-
DBAL-88
MySqlPlatform not escaping table names
-
You have to quote with `` in Doctrine. That is translated to the underyling vendor quotation signs.