Skip to content

feat: persist migration output in changelog collection#473

Open
vmaerten wants to merge 2 commits intoseppevs:masterfrom
vmaerten:feat/migration-output
Open

feat: persist migration output in changelog collection#473
vmaerten wants to merge 2 commits intoseppevs:masterfrom
vmaerten:feat/migration-output

Conversation

@vmaerten
Copy link

Description

Allow up() migrations to return JSON-serializable values that are stored in the changelog document under the 'output' field. This enables better auditing and debugging of migrations (e.g., tracking number of modified documents, created IDs, etc.).

Related Issue

Closes #472

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Dependency update
  • Other (please describe):

Testing

Automated testing

Checklist

  • My code follows the code style of this project (npm run lint passes)
  • All tests pass (npm test passes)
  • Code coverage remains at 100%
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation (if applicable)
  • I have updated the CHANGELOG.md (for user-facing changes)
  • My changes generate no new warnings
  • I have checked my code for potential security issues

Screenshots (if applicable)

Additional Notes

Allow up() migrations to return JSON-serializable values that are
stored in the changelog document under the 'output' field. This enables
better auditing and debugging of migrations (e.g., tracking number of
modified documents, created IDs, etc.).

Closes #472
- Add "Capturing migration output" section to README
- Update status() API signature to include output field
- Add changelog entry for the feature
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.

[FEATURE] Be able to save migration output in the migration collection

1 participant