Skip to content

feat(agents-server): accept caller-owned migration clients - #4747

Open
adityavkk wants to merge 1 commit into
electric-sql:mainfrom
adityavkk:adityavkk/4746-caller-owned-migration-client
Open

feat(agents-server): accept caller-owned migration clients#4747
adityavkk wants to merge 1 commit into
electric-sql:mainfrom
adityavkk:adityavkk/4746-caller-owned-migration-client

Conversation

@adityavkk

@adityavkk adityavkk commented Jul 31, 2026

Copy link
Copy Markdown

Summary

  • Accept a caller-owned PgClient in runMigrations and leave its lifecycle with the caller.
  • Keep the existing PostgreSQL URL form and close its internal client after success or failure.
  • Cover both public API forms and each ownership path with focused tests.

Callers that pass a client must close it themselves.

Test plan

  • pnpm --filter @electric-ax/agents-server test
  • pnpm --filter @electric-ax/agents-server typecheck
  • pnpm --filter @electric-ax/agents-server stylecheck
  • pnpm --filter @electric-ax/agents-server build
  • pnpm run format:check
  • GITHUB_BASE_REF=main node scripts/check-changeset.mjs

Closes #4746


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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.

Allow runMigrations to accept a caller-owned PostgreSQL client

1 participant