Problematic interaction between MigrationsSqlGenerator and new type mapper #10942
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
I have an Npgsql test failing in both preview1 and preview2, tracking it down points to the following code in MigrationsSqlGenerator:
This code is responsible for finding the type mapping when there's no Property for it. If the old type mapper is used, everything seems to be OK and the StringMapper and ByteArrayMapper correctly receive
maxLength
,unicode
and the other facets. However, with the new type mapper, only the clrType is passed and the other information is lost. Thus, if an AlterColumnOperator with a MaxLength of 30 is executed without a Property, the max length will not be passed into the type mapper and will be lost.It seems like the code here should be constructing a
RelationalTypeMappingInfo
, populating it with everything, and passing that to the typemapper.The text was updated successfully, but these errors were encountered: