7

In annotation based mapping, as per the documentation of doctrine, we can do as shown below:

/** @Column(type="string", columnDefinition="ENUM('visible', 'invisible')") */

My question is how do I represent this in yaml meta data file for doctrine?

I want to do something like this:

fields:
status:
  type: string
  columnDefinition: ....

I am using symfony 2 as framework

sonam
  • 3,720
  • 12
  • 45
  • 66

2 Answers2

13

Just use:

fields:
status:
  type: string
  columnDefinition: ENUM('visible', 'invisible')
Carlos Granados
  • 11,273
  • 1
  • 38
  • 44
1
status:
    type: enum
    values: ['visible', 'invisible']

https://www.doctrine-project.org/projects/doctrine1/en/latest/manual/yaml-schema-files.html#enums

Rob Bricheno
  • 4,467
  • 15
  • 29
Serghei Niculaev
  • 513
  • 7
  • 17