diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2017-2018 Anton Ekblad
+Copyright (c) 2017-2019 Anton Ekblad
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/selda-sqlite.cabal b/selda-sqlite.cabal
--- a/selda-sqlite.cabal
+++ b/selda-sqlite.cabal
@@ -1,5 +1,5 @@
 name:                selda-sqlite
-version:             0.1.7.0
+version:             0.1.7.1
 synopsis:            SQLite backend for the Selda database EDSL.
 description:         Allows the Selda database EDSL to be used with SQLite
                      databases.
@@ -26,7 +26,7 @@
     CPP
   build-depends:
       base          >=4.9 && <5
-    , selda         >=0.4 && <0.5
+    , selda         >=0.5 && <0.6
     , text          >=1.0 && <1.3
   if !flag(haste)
     build-depends:
diff --git a/src/Database/Selda/SQLite.hs b/src/Database/Selda/SQLite.hs
--- a/src/Database/Selda/SQLite.hs
+++ b/src/Database/Selda/SQLite.hs
@@ -97,8 +97,14 @@
         | (names, "u") <- ixs
         ]
       , tablePrimaryKey = concat
-        [ map mkColName names
-        | (names, "pk") <- ixs
+        [ concat
+          [ map mkColName names
+          | (names, "pk") <- ixs
+          ]
+        , [ colName ci
+          | ci <- colInfos
+          , colIsAutoPrimary ci
+          ]
         ]
       }
   where
