Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.

Commit 1229914

Browse files
authored
Merge pull request #28 from shak-mar/fix-32bit
Fix tests on 32 bit machines
2 parents 0c89b20 + fc1d881 commit 1229914

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Readme.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ or in Haskell.
1919

2020
## Why?
2121
Database migrations should not be hard. They should be under version control
22-
and documented in both your production systems and in your project files.
22+
and documented both in your production systems and in your project files.
2323

2424
## What?
2525
This library executes SQL/Haskell migration scripts and keeps track of their

src/Database/PostgreSQL/Simple/Util.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ module Database.PostgreSQL.Simple.Util
2121
import Control.Exception (finally)
2222
import Database.PostgreSQL.Simple (Connection, Only (..), begin,
2323
query, rollback)
24+
import GHC.Int (Int64)
2425

2526
-- | Checks if the table with the given name exists in the database.
2627
existsTable :: Connection -> String -> IO Bool
2728
existsTable con table =
28-
fmap checkRowCount (query con q (Only table) :: IO [[Int]])
29+
fmap checkRowCount (query con q (Only table) :: IO [[Int64]])
2930
where
3031
q = "select count(relname) from pg_class where relname = ?"
3132

32-
checkRowCount :: [[Int]] -> Bool
33+
checkRowCount :: [[Int64]] -> Bool
3334
checkRowCount ((1:_):_) = True
3435
checkRowCount _ = False
3536

0 commit comments

Comments
 (0)