persistent-sqlite 0.6.0 → 0.6.1
raw patch · 2 files changed
+5/−4 lines, 2 files
Files
Database/Persist/Sqlite.hs view
@@ -144,14 +144,15 @@ getCopyTable getter val = do stmt <- getter $ pack $ "PRAGMA table_info(" ++ escape table ++ ")" oldCols' <- withStmt stmt [] getCols- let oldCols = map (RawName . unpack) $ filter (/= "id") oldCols'+ let oldCols = map (RawName . unpack) $ filter (/= "id") oldCols' -- need to update for table id attribute ? let newCols = map cName cols let common = filter (`elem` oldCols) newCols+ let id_ = rawTableIdName $ entityDef val return [ (False, tmpSql)- , (False, copyToTemp $ RawName "id" : common)+ , (False, copyToTemp $ id_ : common) , (common /= oldCols, pack dropOld) , (False, newSql)- , (False, copyToFinal $ RawName "id" : newCols)+ , (False, copyToFinal $ id_ : newCols) , (False, pack dropTmp) ] where
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name: persistent-sqlite-version: 0.6.0+version: 0.6.1 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>