You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f89014c
Browse filesBrowse the repository at this point in the historyBrowse files
fix: resolve merge conflicts and fix Migration Dry-Run / Backend Tests CI
Merged origin/main into this branch:
- .github/workflows/ci.yml: main had already independently added the
same "zk-tests" job content this branch's diff collided with, which
left main with that job duplicated verbatim. Resolved by keeping one
copy of zk-tests and appending this branch's new migration-dry-run
job after it, as originally authored.
- backend/src/db/timescale.ts: kept this branch's new dryRunMigrations
and getMigrationStatus functions; main had no competing changes here.
Fixed two bugs the merge/CI run surfaced:
- dryRunMigrations ran every pending migration in its own
BEGIN/ROLLBACK, so a migration's schema changes never persisted for
the next one in the same run — any migration depending on an earlier
one (e.g. 007_commitments_cursor_indexes.sql referencing
commitment_outcomes from 001_timescale_setup.sql) always failed with
"relation does not exist", regardless of whether the SQL was
actually correct. Switched to one outer transaction with a savepoint
per migration, matching what the existing code comment already
described.
- The Migration Dry-Run job used plain postgres:16, which doesn't have
the timescaledb extension 001_timescale_setup.sql requires (unlike
the real docker-compose stack, which uses
timescale/timescaledb:latest-pg16). Switched the CI service to the
same image so the dry-run is actually representative.
- This branch's own rename of 004_horizon_sse_cursors.sql ->
006_horizon_sse_cursors.sql (deduplicating a numbering collision
with 004_reputation_snapshots.sql) left a stale hardcoded path in
sse-indexer.test.ts pointing at the old filename, failing Backend
Tests. Updated both references.
Verified locally: full backend build, `npm test` (all 3 suites), and
migrate-dry-run.js against a real timescale/timescaledb:latest-pg16
container — all 10 migrations now validate successfully.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments