I Want to create a unique constraints on two attributs. The YML configuration with Doctrine2 isn't well documented. So I try to traduct the XML in YML. What's wrong with this code?
unique-constraints:
name: event_user
columns:
event_id: ~
user_id: ~
Thanks in advance.
Finally I managed to create it by this code:
uniqueConstraints:
event_user_idx:
columns: event_id,user_id
But Thank Reuven for your answer.
You should try that:
uniqueConstraints:
event_user:
columns:
- event_id
- user_id
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With