Skip to content

feat: 'data:pg:migrate' command implementation (W-21303011)#3546

Draft
sbosio wants to merge 4 commits intov11.0.0from
sbosio/ngpg-migrate
Draft

feat: 'data:pg:migrate' command implementation (W-21303011)#3546
sbosio wants to merge 4 commits intov11.0.0from
sbosio/ngpg-migrate

Conversation

@sbosio
Copy link
Contributor

@sbosio sbosio commented Feb 27, 2026

Summary

Here we implement a new data:pg:migrate interactive command that will allow customers to migrate Heroku Postgres Classic databases to the new Advanced tier.

This is sort of a POC, tested only with unit tests and mocked fixtures according to the Data API v1 specification as of now, but it's subject to change.

We'll keep this as a draft PR until all features and bugs on the backend are finalized and the command can be thoroughly tested in the wild with actual databases. This also requires CX reviews and fixes that will be applied with new commits.

Once we're ok with the changes we'll change this to be merged to main branch (as we expect v11 to have shipped by that time) and converted to a PR ready for review and merge. We have a different work item for that on our sprint board: W-21385925.

There's some heavy refactor on this PR around (now shared) behavior between data:pg:create and the new data:pg:migrate command, given the latter needed a way to create an Advanced database as the target for a migration. Shared behavior was generalized and extracted to PoolConfig (in a similar way to what we did for data:pg:create and data:pg:update). While working on this we detected that we missed to copy the unit tests for that PoolConfig module from the NGPG plugin. We fix that here, plus add new tests for the extracted shared behavior.

Type of Change

Breaking Changes (major semver update)

  • Add a ! after your change type to denote a change that breaks current behavior

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Patch Updates (patch semver update)

  • fix: Bug fix
  • deps: Dependency upgrade
  • revert: Revert a previous commit
  • chore: Change that does not affect production code
  • refactor: Refactoring existing code without changing behavior
  • test: Add/update/remove tests

Testing

For now we can only rely on unit tests, because the backend isn't stable enough for smoke testing.

Nevertheless, in order to use it for testing, checkout this branch, build the CLI and use the ./bin/run tool to run the command.

git checkout sbosio/ngpg-migrate
npm install && npm run build
./bin/run data:pg:migrate -a <test-app-name>

Screenshots (if applicable)

Example command execution

Related Issues

GUS work item: W-21303011

@sbosio sbosio requested a review from a team as a code owner February 27, 2026 22:21
@sbosio sbosio marked this pull request as draft February 27, 2026 22:21
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