Search code examples
persistentyesod

How do I make a column name in a table a Primary Key with Persistent?


Here's my model

>Test
   testID Int
   product Text
   firmware Text
   startDate Day
   estimatedFinishDate Day
   status Text
   UniqueStartDate startDate
   UniqueEstimatedFinishDate estimatedFinishDate
   UniqueTestID testID

I would like testID to be the primary key. How do I do that?


Solution

  • Like so, I believe:

    Test id=testID
      product Text
      etc.
    

    with persistent >= 0.6.1. (commit)