Answer the question
In order to leave comments, you need to log in
Why does Symfomy 4 give an error when changing the schema via the command line and how to solve this problem?
In symfomy, I created a Many to many relationship, because of it it gives an error when calling the command: php bin/console doctrine:schema:update --force
Relationship in entity agents:
/**
* Many Realties have Many Agents.
*
* @ManyToMany(targetEntity="App\Metrag\AppBundle\Entity\Realty")
* @JoinTable(name="agent_realties",
* joinColumns={@JoinColumn(name="agent_id", referencedColumnName="id", onDelete="CASCADE")},
* inverseJoinColumns={@JoinColumn(name="realty_id", referencedColumnName="id", onDelete="CASCADE")}
* )
*/
private $realties;
In SchemaException.php line 112:
The table with name 'default.agent_realties' already exists.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question