As far as I know to make a column unique the structure below should be used:
database:
table_name:
column_name: { ..., index: unique }
I want to make multiple columns unique at once. How am I going to do this?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re talking about a composite unique key (e.g., having a unique key based on the combination of multiple fields in the same table), here’s how you’d do that :
As for the yaml syntax, I know you can do it in doctrine (see below), but not sure exactly of the propel format.
Doctrine format (–> from stackoverflow thread: primary key + composite primary key causing problem ) :