diff --git a/Database/Persist/Sqlite.hs b/Database/Persist/Sqlite.hs
--- a/Database/Persist/Sqlite.hs
+++ b/Database/Persist/Sqlite.hs
@@ -271,7 +271,7 @@
 mkCreateTable :: Bool -> EntityDef -> ([Column], [UniqueDef]) -> Text
 mkCreateTable isTemp entity (cols, uniqs) =
   case entityPrimary entity of
-    Just _ ->
+    Just pdef ->
        T.concat
         [ "CREATE"
         , if isTemp then " TEMP" else ""
@@ -281,7 +281,7 @@
         , T.drop 1 $ T.concat $ map sqlColumn cols
         , ", PRIMARY KEY "
         , "("
-        , T.intercalate "," $ map (escape . fieldDB) $ entityFields entity
+        , T.intercalate "," $ map (escape . fieldDB) $ primaryFields pdef
         , ")"
         , ")"
         ]
diff --git a/persistent-sqlite.cabal b/persistent-sqlite.cabal
--- a/persistent-sqlite.cabal
+++ b/persistent-sqlite.cabal
@@ -1,5 +1,5 @@
 name:            persistent-sqlite
-version:         2.0.0.1
+version:         2.0.1
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -24,7 +24,7 @@
     build-depends:   base                    >= 4         && < 5
                    , bytestring              >= 0.9.1
                    , transformers            >= 0.2.1
-                   , persistent              >= 2.0       && < 2.1
+                   , persistent              >= 2.0.1     && < 2.1
                    , monad-control           >= 0.2
                    , containers              >= 0.2
                    , text                    >= 0.7
