title: TypeORM: What's difference between @Unique decorator and { unique: true } in column options?
body: <p>In TypeORM you have the possibility to set a unique flag in the column options, or to set column(s) to unique for the entity.</p>
  <p>When would you use which, and what's the difference there?</p>
  <p><code>@Unique([&quot;firstName&quot;])</code></p>
  <p><a href="https://typeorm.io/#/decorator-reference/unique" rel="noreferrer">https://typeorm.io/#/decorator-reference/unique</a></p>
  <pre><code>@Column({ unique: true })
  firstName: string;
  </code></pre>
  <p><a href="https://typeorm.io/#/decorator-reference/column" rel="noreferrer">https://typeorm.io/#/decorator-reference/column</a></p>