Migrations: Ensure umbracoPropertyData column casing#21015
Merged
Conversation
umbracoPropertyData column casing
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a migration to fix column name casing issues in the umbracoPropertyData table that affect SQL Server bulk insert operations during publishing. When SQL Server uses SqlBulkCopy for bulk inserts, it performs case-sensitive column name matching. Earlier versions of Umbraco created the propertyTypeId column as propertytypeid (lowercase), while the DTO expects propertyTypeId (camel case), causing publish failures on upgraded databases.
Key Changes:
- Added migration
EnsureUmbracoPropertyDataColumnCasingto renamepropertytypeidtopropertyTypeIdon SQL Server - Registered the migration in the UmbracoPlan for version 17.1.0
- Migration skips SQLite databases where case sensitivity is not an issue
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_1_0/EnsureUmbracoPropertyDataColumnCasing.cs | New migration that renames the propertyTypeId column to use correct camel casing on SQL Server databases |
| src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs | Registers the new migration in the upgrade plan for version 17.1.0 |
src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_1_0/EnsureUmbracoPropertyDataColumnCasing.cs
Outdated
Show resolved
Hide resolved
src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_1_0/EnsureUmbracoPropertyDataColumnCasing.cs
Outdated
Show resolved
Hide resolved
src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_1_0/EnsureUmbracoPropertyDataColumnCasing.cs
Outdated
Show resolved
Hide resolved
- Add ILogger to log when column is renamed - Check if column exists with incorrect casing before renaming - Use fluent Rename API instead of raw SQL - Add XML remarks documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
kjac
approved these changes
Dec 1, 2025
Contributor
kjac
left a comment
There was a problem hiding this comment.
I took the liberty to update the migration a bit for clarity 👍
AndyButland
added a commit
that referenced
this pull request
Dec 1, 2025
* Add migration to fix umbracoPropertyData column casing. * Improve migration with column existence check and logging - Add ILogger to log when column is renamed - Check if column exists with incorrect casing before renaming - Use fluent Rename API instead of raw SQL - Add XML remarks documentation ?? Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Clarify what old and new column name really is --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: kjac <kja@umbraco.dk> # Conflicts: # src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
This was referenced Dec 8, 2025
Closed
Bump Umbraco.Cms.Persistence.EFCore from 17.0.0 to 17.0.1
karl-sjogren/umbraco-extend-everything#134
Closed
Merged
This was referenced Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Addresses #20957 and #21010.
This PR adds a migration
EnsureUmbracoPropertyDataColumnCasingto fix a column casing issue found on upgraded databases.SQL Server bulk insert operations are case-sensitive for column names. Earlier versions of Umbraco used lowercase (
propertytypeid) whereas newer versions use camel case (propertyTypeId), causing publish failures on upgraded databases where bulk insert operations are used.Testing
Using SQL Server, ensure the
umbracoPropertyData.propertyTypeIdcolumn is all lower-case via:Start Umbraco with the code from this PR and verify that the migration runs and the column is renamed to the camel-cased
propertyTypeId.