-
Notifications
You must be signed in to change notification settings - Fork 13
Add DB patching mechanism #513
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
Add: Database patching mechanism Add: Patch of content item related GUIDs
Add: Database patching mechanism Add: Patch of content item related GUIDs
Remove: Remove patch mechanism from user's sight
Add: Report unknown commands
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.
Pull Request Overview
This PR adds a DB patching mechanism to handle database fixes without running full migrations. The feature allows applying targeted patches to fix data issues caused by bugs in previous Migration Tool versions.
Key changes:
- Introduces a new
patchcommand alongside the existingmigratecommand - Implements a database patching system with tracking of applied patches
- Updates command parsing to handle both master commands and subcommands
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Migration.Tool.Common/Services/MasterCommand.cs | Defines enum for master commands (Migrate, Patch) |
| Migration.Tool.Common/Services/ICommandParser.cs | Updates interface to return master command and subcommands separately |
| Migration.Tool.Common/Services/DatabasePatcher/IDatabasePatch.cs | Interface for database patch implementations |
| Migration.Tool.Common/Services/DatabasePatcher/DatabasePatcher.cs | Core patching logic with tracking table management |
| Migration.Tool.Common/Services/CommandParser.cs | Refactored to parse master commands first, then subcommands |
| Migration.Tool.CLI/Program.cs | Integrates database patcher into main program flow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Migration.Tool.Common/Services/DatabasePatcher/IDatabasePatch.cs
Outdated
Show resolved
Hide resolved
Migration.Tool.Common/Services/DatabasePatcher/DatabasePatcher.cs
Outdated
Show resolved
Hide resolved
Migration.Tool.Common/Services/DatabasePatcher/DatabasePatcher.cs
Outdated
Show resolved
Hide resolved
Migration.Tool.Common/Services/DatabasePatcher/DatabasePatcher.cs
Outdated
Show resolved
Hide resolved
Chore: Cleanup and document Database patcher
Modify: Remove reference to dbo schema in database patcher
Doc: Add documentation
Motivation
DB patching feature implemented when solving #456 . Since then it was decided to be solved in other way, but we keep this feature for future use, since it's general purpose.