cabal-version:              3.0
name:                       postgresql-migration
version:                    0.2.1.8
synopsis:                   PostgreSQL Schema Migrations
homepage:                   https://github.com/andrevdm/postgresql-migration
Bug-reports:                https://github.com/andrevdm/postgresql-migration/issues
license:                    BSD-3-Clause
license-file:               License
author:                     Andreas Meingast <ameingast@gmail.com>
maintainer:                 Andre Van Der Merwe <andre@andrevdm.com>
copyright:                  2014-2021, Andreas Meingast
category:                   Database
build-type:                 Simple
description:                A PostgreSQL-simple schema migration utility
tested-with:                GHC==9.6.1
                            GHC==9.4.4
                            GHC==9.2.7
                            GHC==9.0.2
                            GHC==8.8.4
                            GHC==8.6.5
                            GHC==9.8.2
extra-doc-files:            Readme.markdown
                            Changelog.markdown
extra-source-files:         share/test/*.sql
                            share/test/scripts/*.sql

source-repository head
  type:                   git
  location:               git://github.com/andrevdm/postgresql-migration

common common-options
  build-depends:
    base >=4.9 && <5
  default-language:
    Haskell2010
  ghc-options: -Wall
               -Wincomplete-uni-patterns
               -Wincomplete-record-updates
               -Wcompat
               -Wredundant-constraints
               -Wnoncanonical-monad-instances
               -Widentities
               -Wpartial-fields
               -fhide-source-paths
               -freverse-errors

  if impl(ghc >= 8.8.1)
    ghc-options: -fwrite-ide-info -hiedir=.hie

  if impl(ghc >= 8.10)
    ghc-options: -Wunused-packages

library
  import:                 common-options
  exposed-modules:        Database.PostgreSQL.Simple.Migration
                        , Database.PostgreSQL.Simple.Migration.V1Compat
                        , Database.PostgreSQL.Simple.Util
  other-modules:          Paths_postgresql_migration
  autogen-modules:        Paths_postgresql_migration
  hs-source-dirs:         src
  build-depends:          base                        >= 4.9      && < 5.0
                        , base64-bytestring           >= 1.0      && < 1.3
                        , bytestring                  >= 0.10     && < 0.13
                        , cryptohash-md5              >= 0.11     && < 0.12
                        , directory                   >= 1.2      && < 1.4
                        , filepath                    >= 1.4.1.0  && < 1.6
                        , postgresql-simple           >= 0.4      && < 0.8
                        , time                        >= 1.4      && < 1.13
                        , text                        >= 1.2      && < 2.2

executable migrate
  import:                 common-options
  ghc-options:            -threaded
  main-is:                Main.hs
  other-modules:          Paths_postgresql_migration
  autogen-modules:        Paths_postgresql_migration
  hs-source-dirs:         app
  build-depends:          postgresql-migration
                        , base                        >= 4.9      && < 5.0
                        , bytestring                  >= 0.10     && < 0.13
                        , postgresql-simple           >= 0.4      && < 0.8
                        , text                        >= 1.2      && < 2.2

test-suite tests
  import:                 common-options
  main-is:                Main.hs
  hs-source-dirs:         test
  other-modules:          Database.PostgreSQL.Simple.MigrationTest
                        , Database.PostgreSQL.Simple.MigrationTestV1Compat
                        , Database.PostgreSQL.Simple.TransactionPerRunTest
                        , Database.PostgreSQL.Simple.TransactionPerStepTest
  type:                   exitcode-stdio-1.0
  build-depends:          postgresql-migration
                        , base                        >= 4.9      && < 5.0
                        , postgresql-simple           >= 0.4      && < 0.8
                        , hspec                       >= 2.2      && < 2.12
                        , bytestring                  >= 0.10     && < 0.13