persistent-sqlite 2.6.3 → 2.6.3.1
raw patch · 3 files changed
+10/−6 lines, 3 filesnew-uploader
Files
- ChangeLog.md +4/−0
- Database/Persist/Sqlite.hs +5/−5
- persistent-sqlite.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 2.6.3.1++* Fix migration to avoid creating foreign-key constraints in temporary tables [#736](https://github.com/yesodweb/persistent/pull/736)+ ## 2.6.3 * Add 'use-pkgconfig' flag to use pkg-config to find system SQLite library.
Database/Persist/Sqlite.hs view
@@ -429,7 +429,7 @@ , " TABLE " , escape $ entityDB entity , "("- , T.drop 1 $ T.concat $ map sqlColumn cols+ , T.drop 1 $ T.concat $ map (sqlColumn isTemp) cols , ", PRIMARY KEY " , "(" , T.intercalate "," $ map (escape . fieldDB) $ compositeFields pdef@@ -447,7 +447,7 @@ , showSqlType $ fieldSqlType $ entityId entity ," PRIMARY KEY" , mayDefault $ defaultAttribute $ fieldAttrs $ entityId entity- , T.concat $ map sqlColumn cols+ , T.concat $ map (sqlColumn isTemp) cols , T.concat $ map sqlUnique uniqs , ")" ]@@ -457,8 +457,8 @@ Nothing -> "" Just d -> " DEFAULT " <> d -sqlColumn :: Column -> Text-sqlColumn (Column name isNull typ def _cn _maxLen ref) = T.concat+sqlColumn :: Bool -> Column -> Text+sqlColumn noRef (Column name isNull typ def _cn _maxLen ref) = T.concat [ "," , escape name , " "@@ -467,7 +467,7 @@ , mayDefault def , case ref of Nothing -> ""- Just (table, _) -> " REFERENCES " <> escape table+ Just (table, _) -> if noRef then "" else " REFERENCES " <> escape table ] sqlUnique :: UniqueDef -> Text
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name: persistent-sqlite-version: 2.6.3+version: 2.6.3.1 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>