FindEntityType function
https://github.com/aspnet/EntityFramework/blob/dev/src/Microsoft.EntityFrameworkCore.Relational/Migrations/MigrationsSqlGenerator.cs#L786
FindProperty function
https://github.com/aspnet/EntityFramework/blob/dev/src/Microsoft.EntityFrameworkCore.Relational/Migrations/MigrationsSqlGenerator.cs#L793
FindEntityType can match with derived entity type also due to same mapped table in database.
Result of FindProperty depends on result of above. If base type is returned then properties in derived type are not found.
This causes Migrations to have no info about IProperty therefore in the absence of ColumnType clr type is used to find mapping which causes loss of information about max length.