YAML で UNIQUE INDEX

uniqueConstraints をつかう。

Crocos\HogeBundle\Entity\Fuga:
  repositoryClass: Crocos\HogeBundle\Entity\FugaRepository
  type: entity
  table: hoge_fuga
  fields:
    hoge_id:
      id: true
      type: integer
    hoge_key:
      type: string
      length: 255
    value:
      type: text
  uniqueConstraints:
    hoge_id_hoge_key:
      columns: [ hoge_id, hoge_key ]

ドキュメントは Annotation と XML には詳しく書いてあるけど YAML がザルである。