On Tuesday, June 23, 2015 at 8:34:17 AM UTC+9:30, Parsifal wrote:
>
> Hi,
>
> since I updated orm to 2.5.0 and dbal to 2.5.1 when I want to run
> validate-schema command on console I get the error:
>
> [Doctrine\DBAL\Schema\SchemaException]
> An index with name 'uniq_71260315bf396750' was already defined on table
> 'items'.
>
> Actually I did not define any index with that name in that table, I have
> just one primary key. Older doctrine version had no such problem. I did
> search the group and saw some discussions, but I did not understand this is
> a confirmed bug or how can I solve this issue? please advice.
>
>
If your table can be shared, can you provide your Doctrine table
yaml/annotations?
The uniq_<hash> tells me it is an auto-generated index.
You can use
php app/console doctrine:schema:create --dump-sql
to show you the commands that would be used to create your schema, you can
then see which ones cause duplicates.
I suspect that you have are using a combination of annotations that is
causing the trouble.
http://doctrine-orm.readthedocs.org/en/latest/reference/annotations-reference.html#annref-index
e.g. I use
@ORM\Index to rename all my primary key indexes.
@ORM\UniqueConstraint for non-key indxes
But I am not using
@ORM\Column{unique=true}
I think this also causes the index to be created but you can't control the
name at this point, and so when I had both I had your problem.
However, this was a while ago, and I've forgotten the exact cause/
Also, this is the first time I'm using Doctrine, so I really dont know what
I am talking about. I've just bumbled along well enough so far.
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.