mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3966: After 2.5 upgrade: doctrine:schema:update --force fails because it detects invalid index name #4846
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 @doctrinebot on GitHub (Oct 30, 2015).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user renoreckling:
We just upgraded to doctrine 2.5.1.
On our Postgresql DB, running doctrine:schema:update --force after we load our schema from migrations now fails with the following error:
I think that should be impossible. I looked into the DB and there is no index named idx_55881faae3e6fba2 in the database.
The target name IDX_55881FAA2C5BC23E has previously existed but was removed some time ago via db migrations and the appropriate entity change.
This does not happen in doctrine/orm 2.4.4
@doctrinebot commented on GitHub (Oct 30, 2015):
Comment created by renoreckling:
This seems to be caused by an existing foreign key that assumes the presence of an index on the id_column.
We have the situation:
Table A has a column b_id with foreign key constraint to table B.id.
Doctrine seems to assume that every foreign key is accompanied with a matching index, in this example on Table A.b_id, which is missing in our case.