keiro-migrations 0.22.0.0 → 0.23.0.0
raw patch · 3 files changed
+28/−17 lines, 3 filesdep ~kiroku-storedep ~kiroku-store-migrationsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: kiroku-store, kiroku-store-migrations
API changes (from Hackage documentation)
Files
- CHANGELOG.md +10/−0
- keiro-migrations.cabal +6/−6
- test/Main.hs +12/−11
CHANGELOG.md view
@@ -6,6 +6,16 @@ ## [Unreleased] +## 0.23.0.0 — 2026-10-30++### Breaking Changes++- Require `kiroku-store-migrations ^>=0.7.3.0` from+ mori://shinzui/kiroku/packages/kiroku-store-migrations. The composed plan grows+ from 48 to 49 migrations with Kiroku `0017` (store identity and compaction+ ledger); apply it through the existing runner and update migration-count and+ schema-comment fixtures. Existing migration payloads and checksums are unchanged.+ ## 0.22.0.0 — 2026-10-27 ### Breaking Changes
keiro-migrations.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: keiro-migrations-version: 0.22.0.0+version: 0.23.0.0 synopsis: Schema migrations for keiro description: Embedded PostgreSQL schema migrations and a migration runner for the Keiro@@ -333,7 +333,7 @@ bytestring >=0.11 && <0.13, containers >=0.6 && <0.8, hasql >=1.10 && <1.11,- kiroku-store-migrations ^>=0.7.2.0,+ kiroku-store-migrations ^>=0.7.3.0, pg-migrate ^>=1.2.0.0, pg-migrate-embed ^>=1.2.0.0, pg-migrate-import-codd ^>=1.2.0.0,@@ -369,7 +369,7 @@ bytestring >=0.11 && <0.13, hasql >=1.10 && <1.11, keiro-migrations,- kiroku-store-migrations ^>=0.7.2.0,+ kiroku-store-migrations ^>=0.7.3.0, optparse-applicative >=0.17 && <0.20, pg-migrate ^>=1.2.0.0, pg-migrate-cli ^>=1.2.0.0,@@ -415,7 +415,7 @@ hasql >=1.10 && <1.11, hspec >=2.10 && <2.12, keiro-migrations,- kiroku-store-migrations ^>=0.7.2.0,+ kiroku-store-migrations ^>=0.7.3.0, pg-migrate ^>=1.2.0.0, pg-migrate-import-codd ^>=1.2.0.0, pg-migrate-test-support ^>=1.2.0.0,@@ -451,8 +451,8 @@ hasql-pool >=1.2 && <1.5, hspec >=2.10, keiro-migrations,- kiroku-store ^>=0.12.0.0,- kiroku-store-migrations ^>=0.7.2.0,+ kiroku-store ^>=0.13.0.1,+ kiroku-store-migrations ^>=0.7.3.0, lens >=5.2 && <5.4, temporary, text >=2.0 && <2.2,
test/Main.hs view
@@ -79,7 +79,7 @@ ] -> do componentNameText kirokuName `shouldBe` "kiroku" kirokuDependencies `shouldBe` mempty- length kirokuEntries `shouldBe` 16+ length kirokuEntries `shouldBe` 17 componentNameText keiroName `shouldBe` "keiro" dependencyName <- requireRight (componentName "kiroku") keiroDependencies `shouldBe` Set.singleton dependencyName@@ -186,7 +186,7 @@ plan >>= requireRight Keiro.pendingMigrations handshake `shouldBe` planMigrationIds plan- length (Keiro.pendingMigrations handshake) `shouldBe` 48+ length (Keiro.pendingMigrations handshake) `shouldBe` 49 Keiro.ledgerIssues handshake `shouldBe` [] handshakePassed handshake `shouldBe` False @@ -211,7 +211,7 @@ _ <- runMigrationPlan defaultRunOptions settings kirokuOnly >>= requireRight handshake <- missingMigrations defaultRunOptions provider plan >>= requireRight- Keiro.pendingMigrations handshake `shouldBe` drop 16 (planMigrationIds plan)+ Keiro.pendingMigrations handshake `shouldBe` drop 17 (planMigrationIds plan) length (Keiro.pendingMigrations handshake) `shouldBe` 32 Keiro.ledgerIssues handshake `shouldBe` [] handshakePassed handshake `shouldBe` False@@ -448,12 +448,12 @@ assertSchema connection let provider = providerFor connection rerun <- runMigrationPlanWith defaultRunOptions provider plan >>= requireRight- reportOutcomes rerun `shouldBe` replicate 48 AlreadyApplied+ reportOutcomes rerun `shouldBe` replicate 49 AlreadyApplied verified <- verifyMigrationPlanWith defaultRunOptions provider plan >>= requireRight case verified of VerificationReport verificationIssues applied pending unknown -> do verificationIssues `shouldBe` []- length applied `shouldBe` 48+ length applied `shouldBe` 49 pending `shouldBe` [] unknown `shouldBe` [] either (expectationFailure . show) pure result@@ -502,7 +502,7 @@ (runMigrationPlan defaultRunOptions settings plan >>= requireRight) (runMigrationPlan defaultRunOptions settings plan >>= requireRight) sort [reportOutcomes first, reportOutcomes second]- `shouldBe` sort [replicate 48 AppliedNow, replicate 48 AlreadyApplied]+ `shouldBe` sort [replicate 49 AppliedNow, replicate 49 AlreadyApplied] it "upgrades singleton read-model rows into deterministic rebuild groups" $ do fullPlan <- requirePlan@@ -836,7 +836,7 @@ up <- runMigrationPlan defaultRunOptions settings plan >>= requireRight reportOutcomes up `shouldBe` replicate 7 AlreadyApplied- <> replicate 9 AppliedNow+ <> replicate 10 AppliedNow <> replicate 16 AlreadyApplied <> replicate 16 AppliedNow @@ -1273,14 +1273,14 @@ up <- runMigrationPlan defaultRunOptions settings plan >>= requireRight reportOutcomes up `shouldBe` replicate 7 AlreadyApplied- <> replicate 9 AppliedNow+ <> replicate 10 AppliedNow <> replicate 16 AlreadyApplied <> replicate 16 AppliedNow verifiedAfterCanaries <- verifyMigrationPlan defaultRunOptions settings plan >>= requireRight case verifiedAfterCanaries of VerificationReport verificationIssues _ _ _ -> verificationIssues `shouldBe` [] rerun <- runMigrationPlan defaultRunOptions settings plan >>= requireRight- reportOutcomes rerun `shouldBe` replicate 48 AlreadyApplied+ reportOutcomes rerun `shouldBe` replicate 49 AlreadyApplied second <- importCoddHistory defaultImportOptions config provider plan frameworkCoddHistoryMappings >>= requireRight@@ -1290,7 +1290,7 @@ sourceRows <- useSession connection (Session.statement () (sourceRowCountStatement sourceSchema)) sourceRows `shouldBe` 23 facts <- useSession connection (Session.statement () importFactsStatement)- facts `shouldBe` (48, 23, True)+ facts `shouldBe` (49, 23, True) postCoddImportPendingIssues :: IO [VerificationIssue] postCoddImportPendingIssues =@@ -1309,6 +1309,7 @@ ("kiroku", "0014"), ("kiroku", "0015"), ("kiroku", "0016"),+ ("kiroku", "0017"), ("keiro", "0017-schema-management-comment"), ("keiro", "0018"), ("keiro", "0019-keiro-snapshots-state-shape-hash"),@@ -1576,7 +1577,7 @@ (to_regclass('keiro_read.projection_group_status_v1') IS NOT NULL), (obj_description(to_regnamespace('keiro_read'), 'pg_namespace') = 'Versioned, owner-rights read contracts for out-of-process Keiro consumers.'),- (obj_description(to_regnamespace('kiroku'), 'pg_namespace') = 'Managed by pg-migrate component kiroku through 0016'),+ (obj_description(to_regnamespace('kiroku'), 'pg_namespace') = 'Managed by pg-migrate component kiroku through 0017'), (to_regclass('kiroku.ix_streams_browse_name') IS NOT NULL), (obj_description(to_regnamespace('keiro'), 'pg_namespace') = 'Managed by pg-migrate component keiro through 0017-schema-management-comment') ) AS checks(ok)