-
Notifications
You must be signed in to change notification settings - Fork 18
Add documentation for testing specific database data migrations #612
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
Conversation
Deploying contributing-docs with
|
Latest commit: |
41b6e40
|
Status: | ✅ Deploy successful! |
Preview URL: | https://c9c41aa0.contributing-docs.pages.dev |
Branch Preview URL: | https://db-migration-testing-docs.contributing-docs.pages.dev |
Great job, no security vulnerabilities found in this Pull Request |
…uld not be used for schema-only migrations. Additionally, update best practices to include the removal of tests after deployment and verification in production.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following this up, only a couple of minor suggestions.
@@ -72,3 +72,56 @@ The pipeline uses environment variables. An example entry you might add is: | |||
BW_TEST_DATABASES__0__TYPE: SqlServer | |||
BW_TEST_DATABASES__0__CONNECTIONSTRING: myConnectionString | |||
``` | |||
|
|||
## Testing specific database migrations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this heading can be more precise, per your callout below: Testing data migrations
> **Note**: This is meant for testing data migrations only. It assumes your database schema is | ||
> already fully up-to-date. After setting up your test data, it re-runs the specified migration to | ||
> verify how it transforms the data. It will not work for schema-only migrations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use admonitions for this (callouts):
> **Note**: This is meant for testing data migrations only. It assumes your database schema is | |
> already fully up-to-date. After setting up your test data, it re-runs the specified migration to | |
> verify how it transforms the data. It will not work for schema-only migrations. | |
::: note | |
This is meant for testing data migrations only. It assumes your database schema is | |
already fully up-to-date. After setting up your test data, it re-runs the specified migration to | |
verify how it transforms the data. It will not work for schema-only migrations. | |
::: |
The formatting can be a bit fussy but there are lots of examples to compare to elsewhere in contributing docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently that's not a standard so I used [!NOTE]
instead. https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I just updated it to use ::: note
for consistency. That's not supported on github but in some other platforms it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's more about what docusaurus supports rather than Github. Looks good to me now.
📔 Objective
Adds documentation on how to use
MigrationName
to test that data migrations run the same across all supported database providers.⏰ Reminders before review
team
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes