Skip to content

Add missing AggregateFaultCount column to V3_7 migration#120

Merged
sfmskywalker merged 2 commits intofeat/activity-call-stackfrom
copilot/sub-pr-119
Feb 5, 2026
Merged

Add missing AggregateFaultCount column to V3_7 migration#120
sfmskywalker merged 2 commits intofeat/activity-call-stackfrom
copilot/sub-pr-119

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

The V3_7 database migration was incomplete - it added several new fields to ActivityExecutionRecords but omitted the AggregateFaultCount column despite it being present in the entity model and store mappings.

Changes:

  • Added AggregateFaultCount column (int, not null, default 0) to migration Up() method
  • Added corresponding column removal to Down() method for rollback support

The field was already implemented in:

  • ActivityExecutionRecordRecord.cs (line 88-89)
  • DapperActivityExecutionRecordStore.cs mapping 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.

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for activity call stack tracking Add missing AggregateFaultCount column to V3_7 migration Feb 5, 2026
Copilot AI requested a review from sfmskywalker February 5, 2026 11:46
@sfmskywalker sfmskywalker marked this pull request as ready for review February 5, 2026 12:20
Copilot AI review requested due to automatic review settings February 5, 2026 12:20
@sfmskywalker sfmskywalker merged commit ad80b55 into feat/activity-call-stack Feb 5, 2026
3 checks passed
@sfmskywalker sfmskywalker deleted the copilot/sub-pr-119 branch February 5, 2026 12:20
Copy link
Contributor

Copilot AI left a 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 AggregateFaultCount column 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);
Copy link

Copilot AI Feb 5, 2026

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.

Copilot uses AI. Check for mistakes.
Delete.Column("SchedulingActivityId").FromTable("ActivityExecutionRecords");
Delete.Column("SchedulingWorkflowInstanceId").FromTable("ActivityExecutionRecords");
Delete.Column("CallStackDepth").FromTable("ActivityExecutionRecords");
Delete.Column("AggregateFaultCount").FromTable("ActivityExecutionRecords");
Copy link

Copilot AI Feb 5, 2026

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.

Copilot uses AI. Check for mistakes.
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.

2 participants