keiro-migrations 0.19.0.1 → 0.20.0.0
raw patch · 3 files changed
+34/−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 +13/−0
- keiro-migrations.cabal +6/−6
- test/Main.hs +15/−11
CHANGELOG.md view
@@ -6,6 +6,19 @@ ## [Unreleased] +## 0.20.0.0 — 2026-10-12++### Breaking Changes++- Require the Kiroku 0.11 cohort from+ mori://shinzui/kiroku/packages/kiroku-store; see the root changelog and+ upgrade blueprint for subscription constructors, decoding, and migration+ guidance.+- Require `kiroku-store-migrations ^>=0.7.1.0` from+ mori://shinzui/kiroku/packages/kiroku-store-migrations. Stop workers for+ migrations 0013 and 0014; plan the index build in 0015. The composed plan+ now contains 47 migrations.+ ## 0.19.0.1 — 2026-10-05 ### Other Changes
keiro-migrations.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: keiro-migrations-version: 0.19.0.1+version: 0.20.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.6.0.0,+ kiroku-store-migrations ^>=0.7.1.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.6.0.0,+ kiroku-store-migrations ^>=0.7.1.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.6.0.0,+ kiroku-store-migrations ^>=0.7.1.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.9.0.1 && <0.10,- kiroku-store-migrations ^>=0.6.0.0,+ kiroku-store ^>=0.11.0.0,+ kiroku-store-migrations ^>=0.7.1.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` 12+ length kirokuEntries `shouldBe` 15 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` 44+ length (Keiro.pendingMigrations handshake) `shouldBe` 47 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 12 (planMigrationIds plan)+ Keiro.pendingMigrations handshake `shouldBe` drop 15 (planMigrationIds plan) length (Keiro.pendingMigrations handshake) `shouldBe` 32 Keiro.ledgerIssues handshake `shouldBe` [] handshakePassed handshake `shouldBe` False@@ -295,12 +295,12 @@ assertSchema connection let provider = providerFor connection rerun <- runMigrationPlanWith defaultRunOptions provider plan >>= requireRight- reportOutcomes rerun `shouldBe` replicate 44 AlreadyApplied+ reportOutcomes rerun `shouldBe` replicate 47 AlreadyApplied verified <- verifyMigrationPlanWith defaultRunOptions provider plan >>= requireRight case verified of VerificationReport verificationIssues applied pending unknown -> do verificationIssues `shouldBe` []- length applied `shouldBe` 44+ length applied `shouldBe` 47 pending `shouldBe` [] unknown `shouldBe` [] either (expectationFailure . show) pure result@@ -349,7 +349,7 @@ (runMigrationPlan defaultRunOptions settings plan >>= requireRight) (runMigrationPlan defaultRunOptions settings plan >>= requireRight) sort [reportOutcomes first, reportOutcomes second]- `shouldBe` sort [replicate 44 AppliedNow, replicate 44 AlreadyApplied]+ `shouldBe` sort [replicate 47 AppliedNow, replicate 47 AlreadyApplied] it "upgrades singleton read-model rows into deterministic rebuild groups" $ do fullPlan <- requirePlan@@ -683,7 +683,7 @@ up <- runMigrationPlan defaultRunOptions settings plan >>= requireRight reportOutcomes up `shouldBe` replicate 7 AlreadyApplied- <> replicate 5 AppliedNow+ <> replicate 8 AppliedNow <> replicate 16 AlreadyApplied <> replicate 16 AppliedNow @@ -1120,14 +1120,14 @@ up <- runMigrationPlan defaultRunOptions settings plan >>= requireRight reportOutcomes up `shouldBe` replicate 7 AlreadyApplied- <> replicate 5 AppliedNow+ <> replicate 8 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 44 AlreadyApplied+ reportOutcomes rerun `shouldBe` replicate 47 AlreadyApplied second <- importCoddHistory defaultImportOptions config provider plan frameworkCoddHistoryMappings >>= requireRight@@ -1137,7 +1137,7 @@ sourceRows <- useSession connection (Session.statement () (sourceRowCountStatement sourceSchema)) sourceRows `shouldBe` 23 facts <- useSession connection (Session.statement () importFactsStatement)- facts `shouldBe` (44, 23, True)+ facts `shouldBe` (47, 23, True) postCoddImportPendingIssues :: IO [VerificationIssue] postCoddImportPendingIssues =@@ -1152,6 +1152,9 @@ ("kiroku", "0010"), ("kiroku", "0011"), ("kiroku", "0012"),+ ("kiroku", "0013"),+ ("kiroku", "0014"),+ ("kiroku", "0015"), ("keiro", "0017-schema-management-comment"), ("keiro", "0018"), ("keiro", "0019-keiro-snapshots-state-shape-hash"),@@ -1419,7 +1422,8 @@ (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 0012'),+ (obj_description(to_regnamespace('kiroku'), 'pg_namespace') = 'Managed by pg-migrate component kiroku through 0015'),+ (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) """