Skip to content

Migrations: Format migration expression values with the invariant culture (closes #24594) - #24597

Merged
AndyButland merged 5 commits into
umbraco:v17/devfrom
andreaslborg:v17/bugfix/24594-migration-quoted-value-invariant-culture
Nov 13, 2026
Merged

AndyButland merged 5 commits into
umbraco:v17/devfrom
andreaslborg:v17/bugfix/24594-migration-quoted-value-invariant-culture

Format migration date/time values via the syntax provider and escape …

20391b6
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (v17/dev) failed Nov 13, 2026 in 31s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce advisory code health rules (1 file with Complex Method)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
MigrationExpressionBase.cs 1 advisory rule 8.03 → 7.96 Suppress

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method MigrationExpressionBase.cs: GetQuotedValue

✅ Improving Code Health:

  • Primitive Obsession SqliteSyntaxProvider.cs
  • Primitive Obsession ISqlSyntaxProvider.cs
  • String Heavy Function Arguments ISqlSyntaxProvider.cs
  • Primitive Obsession SqlSyntaxProviderBase.cs
  • String Heavy Function Arguments SqlSyntaxProviderBase.cs

Annotations

Check warning on line 219 in src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/dev)

❌ Getting worse: Complex Method

GetQuotedValue increases in cyclomatic complexity from 18 to 21, threshold = 9

This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid
adding more conditionals and code to it without refactoring.

Check notice on line 1 in src/Umbraco.Cms.Persistence.Sqlite/Services/SqliteSyntaxProvider.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/dev)

✅ Getting better: Primitive Obsession

The ratio of primitive types in function arguments decreases from 45.83% to 43.14%, threshold = 30.0%

The functions in this file have too many primitive types (e.g. int, double, float) in their function
argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more
primitive arguments.

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/dev)

✅ Getting better: Primitive Obsession

The ratio of primitive types in function arguments decreases from 70.59% to 60.00%, threshold = 30.0%

The functions in this file have too many primitive types (e.g. int, double, float) in their function
argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more
primitive arguments.

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/dev)

✅ Getting better: String Heavy Function Arguments

The ratio of strings in function arguments decreases from 64.71% to 55.00%, threshold = 39.0%

The functions in this file have a high ratio of strings as arguments. Avoid adding more.

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/dev)

✅ Getting better: Primitive Obsession

The ratio of primitive types in function arguments decreases from 55.42% to 53.49%, threshold = 30.0%

The functions in this file have too many primitive types (e.g. int, double, float) in their function
argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more
primitive arguments.

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/dev)

✅ Getting better: String Heavy Function Arguments

The ratio of strings in function arguments decreases from 46.99% to 45.35%, threshold = 39.0%

The functions in this file have a high ratio of strings as arguments. Avoid adding more.