Skip to content

RE1-T117 migration fix#402

Merged
ucswift merged 1 commit into
masterfrom
develop
Jun 8, 2026
Merged

RE1-T117 migration fix#402
ucswift merged 1 commit into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Enhanced database migration reliability by making operations idempotent, preventing issues from repeated migration attempts.
    • Increased database command timeout to 30 minutes to prevent failures during large-scale index building operations.

@request-info

request-info Bot commented Jun 8, 2026

Copy link
Copy Markdown

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bd387f42-037d-45c6-86ec-fff58a500ba7

📥 Commits

Reviewing files that changed from the base of the PR and between 6f9eedb and 1a92bea.

📒 Files selected for processing (3)
  • Providers/Resgrid.Providers.Migrations/Migrations/M0073_AddingReportingIndexes.cs
  • Providers/Resgrid.Providers.MigrationsPg/Migrations/M0073_AddingReportingIndexesPg.cs
  • Workers/Resgrid.Workers.Console/Program.cs

📝 Walkthrough

Walkthrough

This PR hardens the database migration process for the ReportingDailyRollup table. Two parallel migrations (SQL Server and PostgreSQL) gain idempotent creation logic and no-transaction behavior, while the migration runner receives a 30-minute command timeout to handle longer-running index operations safely.

Changes

Migration Idempotency and Timeout Resilience

Layer / File(s) Summary
Idempotent ReportingDailyRollup migrations
Providers/Resgrid.Providers.Migrations/Migrations/M0073_AddingReportingIndexes.cs, Providers/Resgrid.Providers.MigrationsPg/Migrations/M0073_AddingReportingIndexesPg.cs
Both SQL Server and PostgreSQL migration variants now wrap table and index creation with IfTableNotExists() and IfIndexNotExists() checks, declare TransactionBehavior.None, and guard table deletion with table-existence check in rollback to permit safe re-runs after partial application.
30-minute command timeout for long-running migrations
Workers/Resgrid.Workers.Console/Program.cs
FluentMigrator global command timeout is raised from default to 30 minutes in both PostgreSQL and SQL Server runner branches to prevent timeout failures during index builds on large tables.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title references a ticket number (RE1-T117) but lacks descriptive detail about the actual changes being made (migration idempotency, transaction behavior configuration, and timeout adjustments). Consider using a more descriptive title that explains the main change, such as 'Make reporting index migration idempotent and increase migration timeout' or similar phrasing that conveys the actual modifications.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ucswift

ucswift commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR is approved.

@ucswift ucswift merged commit d323da1 into master Jun 8, 2026
18 of 19 checks passed
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.

1 participant