Migrations: Fix raw SQL with ISqlSyntaxProvider table and column quoting (closes #22603)#22604
Conversation
|
Hi there @idseefeld, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
There was a problem hiding this comment.
Pull request overview
Updates an existing V_17_4_0 upgrade migration to correctly escape table/column identifiers in its raw SQL using ISqlSyntaxProvider, improving compatibility with database providers where unescaped identifiers can break statements (issue #22603).
Changes:
- Pull
ISqlSyntaxProviderfromdatabase.SqlContext.SqlSyntaxinside the migration. - Quote table and column names in the raw
UPDATEstatement viaGetQuotedTableName()/GetQuotedColumnName().
|
As we've built 17.4 for internal testing now @idseefeld, I'd like to not merge anything else into it unless it's something specifically broken since 17.3. Looks to me the migration fix in this PR matches that case, but I don't think the Obviously we need to try to get better to remember quoting the column names. I'll try to keep a better eye on this moving forward. |
|
@AndyButland I'll separate this PR as you suggested. |
AndyButland
left a comment
There was a problem hiding this comment.
Thanks @idseefeld - fix looks correct to me having carefully checked over all the replacements.
ISqlSyntaxProvider table and column quoting (closes #22603)
…oting (closes #22603) (#22604) * fix raw sql with ISqlSyntaxProvider name escaping * reduce hard coded strings * Fix Raw Sql in MemberFilterRepository * fix formating * restore MemberFilterRepository * Correct usage of field name constant. --------- Co-authored-by: Andy Butland <abutland73@gmail.com>
This closes issue #22603
Details will be provided by Copilot😉