packages feed

shomei-migrations-0.2.0.0: shomei-migrations.cabal

cabal-version:      3.0
name:               shomei-migrations
version:            0.2.0.0
synopsis:
  Schema migrations for Shōmei (pg-migrate component, embedded SQL)

description:
  Owns Shōmei's PostgreSQL schema. Embeds Shōmei's ordered SQL manifest at
  compile time with pg-migrate-embed and exposes it as a pg-migrate
  MigrationComponent that a host application can compose with its own
  migrations, so an embedding service applies one migration plan rather than
  two. Ships the shomei-migrate CLI for standalone use, and a public
  test-support sublibrary that provisions a fresh ephemeral PostgreSQL with
  the schema already applied.

homepage:           https://github.com/shinzui/shomei
bug-reports:        https://github.com/shinzui/shomei/issues
license:            MIT
license-file:       LICENSE
author:             Nadeem Bitar
maintainer:         nadeem@gmail.com
copyright:          2026 Nadeem Bitar
category:           Database, Security
build-type:         Simple
tested-with:        GHC ==9.12.4
extra-doc-files:    CHANGELOG.md
extra-source-files:
  migrations/shomei/*.sql
  migrations/shomei/manifest

source-repository head
  type:     git
  location: https://github.com/shinzui/shomei.git

common warnings
  ghc-options:
    -Wall -Wcompat -Widentities -Wincomplete-record-updates
    -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints

common shared
  default-language:   GHC2024
  default-extensions:
    BlockArguments
    DeriveAnyClass
    DuplicateRecordFields
    MultilineStrings
    OverloadedLabels
    OverloadedRecordDot
    OverloadedStrings
    QualifiedDo
    TemplateHaskell

library
  import:          warnings, shared
  hs-source-dirs:  src
  exposed-modules: Shomei.Migrations
  build-depends:
    , base              >=4.18 && <5
    , containers        >=0.7  && <0.8
    , hasql             >=1.10 && <1.11
    , pg-migrate        >=1.1  && <1.2
    , pg-migrate-embed  >=1.1  && <1.2
    , text              >=2.0  && <2.2

executable shomei-migrate
  import:         warnings, shared
  main-is:        Main.hs
  hs-source-dirs: app
  ghc-options:    -threaded -rtsopts -with-rtsopts=-N
  build-depends:
    , aeson                 >=2.1      && <2.3
    , base                  >=4.18     && <5
    , bytestring            >=0.11     && <0.13
    , hasql                 >=1.10     && <1.11
    , optparse-applicative  >=0.19     && <0.20
    , pg-migrate            >=1.1      && <1.2
    , pg-migrate-cli        >=1.1      && <1.2
    , shomei-migrations     ^>=0.2.0.0
    , text                  >=2.0      && <2.2

library test-support
  import:          warnings, shared
  visibility:      public
  hs-source-dirs:  test-support
  exposed-modules: Shomei.Migrations.TestSupport
  build-depends:
    , base               >=4.18     && <5
    , ephemeral-pg       >=0.2.2    && <0.3
    , pg-migrate         >=1.1      && <1.2
    , shomei-migrations  ^>=0.2.0.0
    , text               >=2.0      && <2.2
    , time               >=1.12     && <1.15

test-suite shomei-migrations-test
  import:         warnings, shared
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Main.hs
  ghc-options:    -threaded -rtsopts -with-rtsopts=-N
  build-depends:
    , base                     >=4.18     && <5
    , containers               >=0.7      && <0.8
    , hasql                    >=1.10     && <1.11
    , pg-migrate               >=1.1      && <1.2
    , pg-migrate-test-support  >=1.1      && <1.2
    , shomei-migrations        ^>=0.2.0.0
    , tasty                    >=1.4      && <1.6
    , tasty-hunit              >=0.10     && <0.11