DDC-1317: @Column(unique=true) is not semantically equivalent to @UniqueConstraint and yields invalid SQL for table create statements #1652

Open
opened 2026-01-22 13:21:10 +01:00 by admin · 0 comments
Owner

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

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
admin added the Bug label 2026-01-22 13:21:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1652