Skip to content

chore(schema): re-vendor the canonical baseline - #160

Open
kcrmin wants to merge 1 commit into
developfrom
chore/revendor-canonical-baseline
Open

kcrmin wants to merge 1 commit into
developfrom
chore/revendor-canonical-baseline

Conversation

@kcrmin

@kcrmin kcrmin commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What and why

  • db/canonical-baseline was stale against the central bundle. Here V1__initial_schema.sql was e3bec375 and R__database_runtime_grants.sql was ea009867. Backend and root have ccc5950a and 30a9381d. The copy also lacked the eight migrations after V1. Its baseline.sha256 (4833d2ac) did not match canonical_baseline_sha256 = 1dc82694, which root db/flyway-ci-bundle/source-revisions.json records for this trading commit.
  • Re-vendored as db/canonical-baseline/README.md describes. Root develop c742e48 pins backend 69dd804, backtest a568df0, trading eb97bc3 and data-pipeline d8bd3c0. At those pins, root scripts/prepare-flyway-bundle.ps1 assembled the bundle. All ten .sql files were copied verbatim, and baseline.manifest and baseline.sha256 were regenerated. Nothing was hand-edited.
  • CanonicalBaselineContractTest now expects V1, the eight approved later migrations (the same list root test-flyway-ci-bundle.ps1 enforces), and the runtime grants. The schema now has 185 canonical tables instead of 181: V1 adds operations.operator_login_credentials and operations.operator_sessions, and V20260902000001 adds two storage tables.

Verified

  • pwsh scripts/prepare-flyway-bundle.ps1 in a root worktree at c742e48, with the pinned submodules: passed, with bundle sha256 9dbb764a, equal to the root bundle_sha256. Each assembled .sql file is byte-identical (cmp) to root db/flyway-ci-bundle and to the copy here.
  • The regenerated baseline.sha256 is 1dc826948878b358058b19b7623562a5e8fd85855677dd0791008eea433d138e, equal to root canonical_baseline_sha256.
  • ./gradlew check --no-daemon --no-build-cache with Docker (colima): BUILD SUCCESSFUL, with 745 tests and 0 skipped, failed or errored. All 5 CanonicalBaselineContractTest tests ran and passed.

Checklist

  • The copy matches the bundle assembled at the root pins byte for byte
  • The baseline digest equals the value root records
  • Trading tests that migrate the baseline pass against PostgreSQL
  • No migration file was hand-edited

Related: #161 (narrowed trading grants) is stacked on this branch.

Copy the bundle assembled at the root c742e48 pins: V1, eight later
migrations and grants. baseline.sha256 is now 1dc82694, the value
root records in source-revisions.json.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant