mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[Bug] CLI doctrine:schema:update throws an exception for many to many relationship when already exists a join table #5245
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 @raul782 on GitHub (Sep 11, 2016).
Originally assigned to: @Ocramius on GitHub.
Given a many to many relationship, between author and book, implemented in a project as Book, Author, and BookAuthor entity.
It throws an exception when trying to update the database through a CLI command.
It will throw an exception
The reason is because, the update method is always trying to create a join table without checking in the scenario of the command: doctrine:schema:update if the table already exist. Which is a perfect valid action.
Similar Issue: https://github.com/doctrine/doctrine2/issues/3536
@Ma27 commented on GitHub (Jan 3, 2017):
I think that this can be closed as well as #6027 has been closed (contains the same issue)