Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@
using IScope scope = _scopeProvider.CreateScope();
using IDisposable notificationSuppression = scope.Notifications.Suppress();

// Ensure we have a long command timeout as this migration can take a while on large tables within the database.
// If the command timeout is already longer, applied via the connection string with "Connect Timeout={timeout}" we leave it as is.
const int CommandTimeoutInSeconds = 300;
if (scope.Database.CommandTimeout < CommandTimeoutInSeconds)
{
scope.Database.CommandTimeout = CommandTimeoutInSeconds;
}

Check warning on line 106 in src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_0_0/MigrateSystemDatesToUtc.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Code Health Review (main)

❌ Getting worse: Large Method

Migrate increases from 73 to 78 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
MigrateDateColumn(scope, "cmsMember", "emailConfirmedDate", timeZone);
MigrateDateColumn(scope, "cmsMember", "lastLoginDate", timeZone);
MigrateDateColumn(scope, "cmsMember", "lastLockoutDate", timeZone);
Expand Down
Loading