-
Notifications
You must be signed in to change notification settings - Fork 32
Add missing AggregateFaultCount column to V3_7 migration #120
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
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
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 pull request attempts to add the AggregateFaultCount column to the V3_7 database migration for the ActivityExecutionRecords table. However, this column was already added in the V3_5 migration (line 17 of V3_5.cs). The PR description incorrectly states that the column was omitted from the migration.
Changes:
- Adds
AggregateFaultCountcolumn to V3_7 Up() method (line 22) - this is a duplicate - Adds corresponding column removal to V3_7 Down() method (line 33) - this is incorrect
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Alter.Table("ActivityExecutionRecords").AddColumn("SchedulingActivityId").AsString().Nullable(); | ||
| Alter.Table("ActivityExecutionRecords").AddColumn("SchedulingWorkflowInstanceId").AsString().Nullable(); | ||
| Alter.Table("ActivityExecutionRecords").AddColumn("CallStackDepth").AsInt32().Nullable(); | ||
| Alter.Table("ActivityExecutionRecords").AddColumn("AggregateFaultCount").AsInt32().NotNullable().WithDefaultValue(0); |
Copilot
AI
Feb 5, 2026
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.
The AggregateFaultCount column was already added to the ActivityExecutionRecords table in the V3_5 migration (line 17 of V3_5.cs). Adding it again in V3_7 will cause migration failures because the column already exists. This line should be removed.
| Delete.Column("SchedulingActivityId").FromTable("ActivityExecutionRecords"); | ||
| Delete.Column("SchedulingWorkflowInstanceId").FromTable("ActivityExecutionRecords"); | ||
| Delete.Column("CallStackDepth").FromTable("ActivityExecutionRecords"); | ||
| Delete.Column("AggregateFaultCount").FromTable("ActivityExecutionRecords"); |
Copilot
AI
Feb 5, 2026
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.
This deletion should be removed because the AggregateFaultCount column was already added in the V3_5 migration, not V3_7. The V3_5 Down() method is responsible for removing this column.
The V3_7 database migration was incomplete - it added several new fields to
ActivityExecutionRecordsbut omitted theAggregateFaultCountcolumn despite it being present in the entity model and store mappings.Changes:
AggregateFaultCountcolumn (int, not null, default 0) to migrationUp()methodDown()method for rollback supportThe field was already implemented in:
ActivityExecutionRecordRecord.cs(line 88-89)DapperActivityExecutionRecordStore.csmapping logic (lines 146, 176, 200)This ensures the database schema matches the entity model when the migration runs.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.