diff --git a/fpco-api.cabal b/fpco-api.cabal
--- a/fpco-api.cabal
+++ b/fpco-api.cabal
@@ -1,5 +1,5 @@
 name:                 fpco-api
-version:              1.1.1.1
+version:              1.1.1.2
 synopsis:             Simple interface to the FP Complete IDE API.
 description:          A server and library for communicating with the FP Complete IDE API.
 homepage:             https://www.fpcomplete.com/page/api
diff --git a/src/library/FP/API/Types.hs b/src/library/FP/API/Types.hs
--- a/src/library/FP/API/Types.hs
+++ b/src/library/FP/API/Types.hs
@@ -14,7 +14,7 @@
 
 #ifndef FAY
 import Data.Default (Default(..))
-import Database.Persist.Sql (PersistField, PersistFieldSql)
+import Database.Persist.Sql (PersistField, PersistFieldSql, sqlType)
 import Database.Persist.TH (derivePersistField)
 import System.Random (Random)
 #endif
@@ -544,7 +544,10 @@
 -- | Token for a tutorial.
 newtype TutorialConcurrentToken = TutorialConcurrentToken'
     { unTutorialConcurrentToken :: Int }
-    deriving (Eq, Show, Data, Read, Typeable, PersistField, PersistFieldSql, Random, Num)
+    deriving (Eq, Show, Data, Read, Typeable, PersistField, Random, Num)
+
+instance PersistFieldSql TutorialConcurrentToken where
+    sqlType _ = sqlType (Nothing :: Maybe Int)
 
 instance Default TutorialConcurrentToken where
     def = TutorialConcurrentToken' 1
