Skip to content

Commit

Permalink
Remove redundant import
Browse files Browse the repository at this point in the history
  • Loading branch information
zlondrej committed Sep 4, 2024
1 parent 01c6598 commit 083fba7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Database/PostgreSQL/PQTypes/Checks.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import Database.PostgreSQL.PQTypes.Migrate
import Database.PostgreSQL.PQTypes.Model
import Database.PostgreSQL.PQTypes.SQL.Builder
import Database.PostgreSQL.PQTypes.Versions
import Database.PostgreSQL.PQTypes.Utils.NubList

headExc :: String -> [a] -> a
headExc s [] = error s
Expand Down Expand Up @@ -427,7 +426,7 @@ checkDBStructure options tables = fmap mconcat . forM tables $ \(table, version)
runQuery_ $ sqlGetForeignKeys table
fkeys <- fetchMany fetchForeignKey
triggers <- getDBTriggers tblName
checkedOverlaps <- checkOverlappingIndexes
checkedOverlaps <- checkOverlappingIndexes
return $ mconcat [
checkColumns 1 tblColumns desc
, checkPrimaryKey tblPrimaryKey pk
Expand Down Expand Up @@ -573,7 +572,7 @@ checkDBStructure options tables = fmap mconcat . forM tables $ \(table, version)

allCoverage :: [[RawSQL ()]]
allCoverage = maybe [] pkColumns pkey:allIndexes

-- A foreign key is covered if it is a prefix of a list of indices.
-- So a FK on a is covered by an index on (a, b) but not an index on (b, a).
coveredFK :: ForeignKey -> [[RawSQL ()]] -> Bool
Expand Down Expand Up @@ -602,7 +601,7 @@ checkDBStructure options tables = fmap mconcat . forM tables $ \(table, version)
if eoCheckOverlappingIndexes options
then go
else pure mempty
where
where
go = do
let handleOverlap (contained, contains) =
mconcat
Expand Down

0 comments on commit 083fba7

Please sign in to comment.