[5.0.1] RevEng: Call correct overload of HasIndex when scaffolding constraints without name #23277
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.
Resolves #23268
Description
Regression when scaffolding from database: if a unique constraint does not have a name, then the reverse engineering tool throws an exception.
Customer impact
Regression such that customers who were previously able to reverse engineer a database may now not be able to do so. There is no workaround other than changing your database to name constraints.
We do not have good data on how many people have unnamed constraints, but given this was filed early after release it seems reasonable to assume there will be more.
How found
Customer reported on 5.0. This was a case where we didn't realize it was valid to have a constraint like this without it being named. We previously didn't reverse engineer the name, so we never ran into this until 5.0.
Test coverage
This PR includes test for the affected scenario.
Regression?
Yes, from 3.1.
Risk
Low. The fix calls into correct overload of method as required preserving previous path when no name is found. Also, this is a fix to a design-time scenario. Running applications should not be impacted.