mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1317: @Column(unique=true) is not semantically equivalent to @UniqueConstraint and yields invalid SQL for table create statements #1653
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 (Aug 3, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user @jmikola:
Benjamin told me that @Column(unique=true) should be semantically equivalent to @UniqueConstraint within @Table; however, I am seeing invalid table creation SQL generated when using the @Column alternative. I am using MySQL and InnoDB.
Our submodule pointer was between 2.1.0BETA and 2.1.0RC1, so I marked this against version 2.0.6.
The example class and console output (when attempting an automatic schema update) may be found here: https://gist.github.com/1123476
@doctrinebot commented on GitHub (Aug 6, 2011):
Comment created by @beberlei:
The problem is that "key" is a mysql keyword. That is also the portion that fails in the SQL query error message, nothing related to the unique constraint.
@doctrinebot commented on GitHub (Aug 6, 2011):
Issue was closed with resolution "Invalid"