Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api): Add generic migration helper script #4780

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

rifont
Copy link
Collaborator

@rifont rifont commented Nov 7, 2023

What change does this PR introduce?

  • Modifies the existing and now defunct migration script to allow the migration script path to be provided as a positional npm script argument
  • Removes feature specific migration scripts in favour of the new pattern. These are unreleased migrations, so no customer impact is expected.
  • Adds documentation for API database migrations

Why was this change needed?

Every time a new migration script is added, we are currently adding a new NPM script. This is not DRY and can result in migrations being run differently. Furthermore, abstracting this pattern will enable us to write consistent documentation for our users to migrate their self-hosted Novu databases.

Other information (Screenshots)

Migrations section in apps/api/README.md
image

Copy link
Contributor

@LetItRock LetItRock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! 🎉 thanks Richard!

@rifont rifont merged commit 4219509 into next Nov 7, 2023
@rifont rifont deleted the api-migration-helper-script branch November 7, 2023 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants