title: Deciding between unique, primary, or increments in Laravel Migrations
body: <p>I have a table of of data where the primary unique element is called a <code>CRN</code>, which denotes "course registration number", and it's an integer value.</p>
  
  <p>In this table there are around 4000 classes, and each class has a unique CRN.</p>
  
  <p>My question is, in my schema builder for migrations, should this I set the <code>CRN</code> as a unique, a primary, or an increments?</p>
  
  <p>According to my usage, a unique makes the most sense.</p>
  
  <p>The CRN is indeed unique, and never changes. I have a script that updates the other columns that corresponds to this CRN, and having CRN as unique will prevent additional rows of the same CRN created.</p>
  
  <p>A bug I ran into without setting any of these constraints of unique/primary/increments is, when I re-ran my script that updates the enrollment numbers, for example, for a CRN, a new row is generated instead of it being updated. So now I have two rows of data of the same CRN. </p>