packages feed

kioku-migrations 0.8.0.1 → 0.8.0.2

raw patch · 3 files changed

+23/−5 lines, 3 filesdep +directorydep +unixdep ~ephemeral-pgdep ~kioku-migrationsPVP ok

version bump matches the API change (PVP)

Dependencies added: directory, unix

Dependency ranges changed: ephemeral-pg, kioku-migrations

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## 0.8.0.2 — 2026-10-06++### Fixed++- Pin bare-database fixtures to the same stable effective-uid temporary root owned by `mori://shinzui/keiro/packages/keiro-test-support` as the delegated migrated fixtures; keep stale-instance sweeping enabled and require `mori://shinzui/ephemeral-pg/packages/ephemeral-pg` >=0.3.1 && <0.4.+ ## [Unreleased]  ## 0.8.0.1 — 2026-10-05
kioku-migrations.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: kioku-migrations-version: 0.8.0.1+version: 0.8.0.2 synopsis: Schema migrations for kioku description:   Owns kioku schema evolution as a native pg-migrate component and composes@@ -86,10 +86,12 @@   exposed-modules: Kioku.Migrations.TestSupport   build-depends:     base >=4.18 && <5,-    ephemeral-pg ^>=0.3.1.0,+    directory >=1.3 && <1.4,+    ephemeral-pg >=0.3.1 && <0.4,     keiro-test-support ^>=0.19.0.0,-    kioku-migrations ^>=0.8.0.1,+    kioku-migrations ^>=0.8.0.2,     text >=2.0 && <2.2,+    unix >=2.8 && <2.9,  test-suite kioku-migrations-test   import: warnings, shared@@ -110,7 +112,7 @@     containers >=0.6 && <0.8,     hasql >=1.6,     keiro-migrations ^>=0.19.0.0,-    kioku-migrations ^>=0.8.0.1,+    kioku-migrations ^>=0.8.0.2,     kioku-migrations:test-support,     kiroku-store-migrations ^>=0.6.0.0,     pg-migrate ^>=1.2.0.0,
test-support/Kioku/Migrations/TestSupport.hs view
@@ -4,10 +4,13 @@   ) where +import Data.Monoid (Last (..)) import Data.Text (Text) import EphemeralPg qualified import Keiro.Test.Postgres qualified as Keiro import Kioku.Migrations (kiokuMigrations)+import System.Directory (createDirectoryIfMissing)+import System.Posix.User (getEffectiveUserID)  withKiokuMigratedDatabase :: (Text -> IO a) -> IO a withKiokuMigratedDatabase use = do@@ -21,5 +24,12 @@ -- against) start from here. withBareDatabase :: (Text -> IO a) -> IO a withBareDatabase use = do-  result <- EphemeralPg.with (use . EphemeralPg.connectionString)+  -- Migrated fixtures delegate to mori://shinzui/keiro/packages/keiro-test-support.+  -- Share its stable per-user root so either fixture sweeps abandoned clusters+  -- from earlier runs, including runs under a different shell's TMPDIR.+  uid <- getEffectiveUserID+  let root = "/tmp/ephpg-keiro-" <> show uid+  createDirectoryIfMissing True root+  let config = EphemeralPg.defaultConfig {EphemeralPg.temporaryRoot = Last (Just root)}+  result <- EphemeralPg.withConfig config (use . EphemeralPg.connectionString)   either (fail . show) pure result