-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diff error : "An index with name ... was already defined on table '...'. " #3828
Comments
@psohm please reproduce using only the DBAL APIs. |
hello I fear to miss your need |
Please see #2897 for example. A maintainer should be able to run the code you will provide and reproduce the issue. So far, there's not enough information on how to reproduce it. |
I pushed a project with the problem. |
Just for explain The two OneToOne relationship are view but it isn't necessary In SchemaException.php line 68: An index with name 'uniq_19653dbdbf396750' was already defined on table 'societe'. |
hi, did you manage to reproduce the issue ? |
No, I currently don't have time to debug a Symfony project. |
Erm, what? Isn't DBAL a Doctrine component, and isn't Doctrine mainly used in Symfony applications? I have the exact same error at the moment, the only difference is that I have 3 entities (one main and two auxilary) and I'm trying to link them together in two OneToOne relationships using the same PK values in 3 MySQL tables. |
Bug Report
Summary
Doctrine diff fail on some configuration
Current behaviour
When I make a doctrine:diff Doctrine tryes to create index for 2 different Entity mapped with a OneToOne association
I have an error
An index with name 'uniq_19653dbdbf396750' was already defined on table 'societe'.
How to reproduce
You need to have 2 Entity named VueContrat and VueCo.
That 2 entity are Mysql View.
Expected behaviour
I expect to disable the creation for that 2 views.
We can reduce the problem using doctrine event listener but I didn't find the right event.
We can also have a solution if we can set the index name explicitely.
The text was updated successfully, but these errors were encountered: