packages feed

hpqtypes-extras 1.16.4.1 → 1.16.4.2

raw patch · 4 files changed

+12/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+# hpqtypes-extras-1.16.4.2 (2023-05-23)+* Make order of tables during schema creation irrelevant.+ # hpqtypes-extras-1.16.4.1 (2023-05-15) * Relax checks around indexes related to the `REINDEX` operation. 
README.md view
@@ -1,4 +1,7 @@-# hpqtypes-extras [![Hackage version](https://img.shields.io/hackage/v/hpqtypes-extras.svg?label=Hackage)](https://hackage.haskell.org/package/hpqtypes-extras) [![Build Status](https://secure.travis-ci.org/scrive/hpqtypes-extras.svg?branch=master)](http://travis-ci.org/scrive/hpqtypes-extras)+# hpqtypes-extras++[![Build Status](https://github.com/scrive/hpqtypes-extras/workflows/Haskell-CI/badge.svg?branch=master)](https://github.com/scrive/hpqtypes-extras/actions?query=branch%3Amaster)+[![Hackage](https://img.shields.io/hackage/v/hpqtypes-extras.svg)](https://hackage.haskell.org/package/hpqtypes-extras)  The following extras for [hpqtypes](http://hackage.haskell.org/package/hpqtypes) library:
hpqtypes-extras.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                hpqtypes-extras-version:             1.16.4.1+version:             1.16.4.2 synopsis:            Extra utilities for hpqtypes library description:         The following extras for hpqtypes library:                      .
src/Database/PostgreSQL/PQTypes/Migrate.hs view
@@ -25,6 +25,8 @@   -- Create empty table and add the columns.   runQuery_ $ sqlCreateTable tblName   runQuery_ $ sqlAlterTable tblName $ map sqlAddColumn tblColumns+  -- Add the primary key if applicable.+  forM_ tblPrimaryKey $ \pk -> runQuery_ $ sqlAlterTable tblName [sqlAddPK tblName pk]   -- Add indexes.   forM_ tblIndexes $ runQuery_ . sqlCreateIndexMaybeDowntime tblName   -- Add all the other constraints if applicable.@@ -40,9 +42,8 @@ createTableConstraints Table{..} = when (not $ null addConstraints) $ do   runQuery_ $ sqlAlterTable tblName addConstraints   where-    addConstraints = concat [-        [sqlAddPK tblName pk | Just pk <- return tblPrimaryKey]-      , map sqlAddValidCheckMaybeDowntime tblChecks+    addConstraints = concat+      [ map sqlAddValidCheckMaybeDowntime tblChecks       , map (sqlAddValidFKMaybeDowntime tblName) tblForeignKeys       ]