mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
orm:schema-tool:drop does not escape identifiers properly #5496
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MatthiasKuehneEllerhold on GitHub (Apr 7, 2017).
Using the
orm:schema-tool:dropCLI Command does not work properly because identifiers dont get escaped correctly.Create test database:
Execute the CLI Command in bash:
Properly escaping the foreign key would have worked:
This was used in a ZF3 Project with the doctrine-orm-module, but the drop command is in Doctrine\ORM here: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php
Versions:
@theofidry commented on GitHub (Apr 7, 2017):
I think this is the same issue as https://github.com/doctrine/doctrine2/issues/5874 in which case this cannot be fixed automatically in 2.x.
@Ocramius commented on GitHub (Apr 8, 2017):
@theofidry that applies to columns, not to constraint names. I think this is a DBAL issue to be reported/tested there.