Fix RawSql backward compatibility in DELETE and UPDATE WHERE clauses#2199
Conversation
Co-authored-by: jzabroski <[email protected]>
Co-authored-by: jzabroski <[email protected]>
|
@copilot You need to update MigrationRunnerTests.cs here fluentmigrator/test/FluentMigrator.Tests/Integration/MigrationRunnerTests.cs Lines 2172 to 2184 in fcc42a9 |
Co-authored-by: jzabroski <[email protected]>
Updated |
|
@PhenX This looks good to me. Can you review as well? |
|
I published 7.2.0 release notes. I still need to approve it in ADO for official release, but plan is to release 7.2, then publish 8.0 with .NET 10 support in #2181 |
RawSql.Insert("(SELECT...)")in Delete/Update WHERE clauses no longer adds the=operator automaticallyGenerateWheremethod inGenericGenerator.csnow expects the operator to be included in the RawSql value, but old code passed just the value=by default for backward compatibilitySummary
The fix maintains backward compatibility by detecting whether a
RawSqlvalue starts with an operator. If it doesn't, the=operator is automatically added.Both syntaxes now work:
RawSql.Insert("(SELECT...)")orRawSql.Insert("104")- automatically adds=operatorRawSql.Insert("= 3")orRawSql.Insert("IS NULL")- used as-isOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.