diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+## 2.6.3.2
+
+* Provide more detailed error messages when using the `step` function [#730](https://github.com/yesodweb/persistent/pull/730)
+
 ## 2.6.3.1
 
 * Fix migration to avoid creating foreign-key constraints in temporary tables [#736](https://github.com/yesodweb/persistent/pull/736)
diff --git a/Database/Persist/Sqlite.hs b/Database/Persist/Sqlite.hs
--- a/Database/Persist/Sqlite.hs
+++ b/Database/Persist/Sqlite.hs
@@ -136,7 +136,7 @@
         -- Turn on the write-ahead log
         -- https://github.com/yesodweb/persistent/issues/363
         turnOnWal <- Sqlite.prepare conn "PRAGMA journal_mode=WAL;"
-        _ <- Sqlite.step turnOnWal
+        _ <- Sqlite.step conn turnOnWal
         Sqlite.reset conn turnOnWal
         Sqlite.finalize turnOnWal
 
@@ -144,7 +144,7 @@
         -- Turn on foreign key constraints
         -- https://github.com/yesodweb/persistent/issues/646
         turnOnFK <- Sqlite.prepare conn "PRAGMA foreign_keys = on;"
-        _ <- Sqlite.step turnOnFK
+        _ <- Sqlite.step conn turnOnFK
         Sqlite.reset conn turnOnFK
         Sqlite.finalize turnOnFK
 
@@ -253,7 +253,7 @@
 execute' :: Sqlite.Connection -> Sqlite.Statement -> [PersistValue] -> IO Int64
 execute' conn stmt vals = flip finally (liftIO $ Sqlite.reset conn stmt) $ do
     Sqlite.bind stmt vals
-    _ <- Sqlite.step stmt
+    _ <- Sqlite.step conn stmt
     Sqlite.changes conn
 
 withStmt'
@@ -269,7 +269,7 @@
     return pull
   where
     pull = do
-        x <- liftIO $ Sqlite.step stmt
+        x <- liftIO $ Sqlite.step conn stmt
         case x of
             Sqlite.Done -> return ()
             Sqlite.Row -> do
diff --git a/Database/Sqlite.hs b/Database/Sqlite.hs
--- a/Database/Sqlite.hs
+++ b/Database/Sqlite.hs
@@ -254,13 +254,13 @@
 stepError (Statement statement) = do
   error <- stepC statement
   return $ decodeError error
-step :: Statement -> IO StepResult
-step statement = do
+step :: Connection -> Statement -> IO StepResult
+step database statement = do
   error <- stepError statement
   case error of
     ErrorRow -> return Row
     ErrorDone -> return Done
-    _ -> sqlError Nothing "step" error
+    _ -> sqlError (Just database) "step" error
 
 foreign import ccall "sqlite3_reset"
   resetC :: Ptr () -> IO Int
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.6.3.1
+version:         2.6.3.2
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
