diff --git a/Database/Persist/TH.hs b/Database/Persist/TH.hs
--- a/Database/Persist/TH.hs
+++ b/Database/Persist/TH.hs
@@ -965,7 +965,7 @@
        dtd : mconcat fkc `mappend`
       ([ TySynD (keyIdName t) [] $
             ConT ''Key `AppT` ConT (mkName nameS)
-      , InstanceD instanceConstraint clazz $
+      , instanceD instanceConstraint clazz $
         [ uniqueTypeDec mps t
         , keyTypeDec
         , keyToValues'
@@ -1207,7 +1207,7 @@
         let entityT = genericDataType mps name backendT
 
         return $
-            InstanceD
+            instanceD
             [ mkClassP ''PersistQuery [backendT]
             , mkEqualP (ConT ''PersistEntityBackend `AppT` entityT) backendT
             ]
@@ -1251,7 +1251,7 @@
               -> Bool -- ^ include PersistStore backend constraint
               -> Type -> [Dec] -> Dec
 typeInstanceD clazz hasBackend typ =
-    InstanceD ctx (ConT clazz `AppT` typ)
+    instanceD ctx (ConT clazz `AppT` typ)
   where
     ctx
         | hasBackend = [mkClassP ''PersistStore [backendT]]
@@ -1599,6 +1599,12 @@
 isStrict = IsStrict
 #endif
 
+instanceD :: Cxt -> Type -> [Dec] -> Dec
+#if MIN_VERSION_template_haskell(2,11,0)
+instanceD = InstanceD Nothing
+#else
+instanceD = InstanceD
+#endif
 
 -- entityUpdates :: EntityDef -> [(HaskellName, FieldType, IsNullable, PersistUpdate)]
 -- entityUpdates =
diff --git a/persistent-template.cabal b/persistent-template.cabal
--- a/persistent-template.cabal
+++ b/persistent-template.cabal
@@ -1,5 +1,5 @@
 name:            persistent-template
-version:         2.1.7
+version:         2.1.8
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
