Fortunately, there is no such problem in EF :) I tested your script and it works fine.
For this you need to use the [MaxLength(100)] attribute. Here is the document: MaxLength Data Annotations
Test case: I used MaxLength as 500 for my test.
First, I created a property similar to this:
public string Title { get; set; }
After migration:

After that, I changed it as follows:
[MaxLength(500)] public string Title { get; set; }
After migration:

Generated Script:
migrationBuilder.AlterColumn<string>( name: "Title", table: "Posts", maxLength: 500, nullable: true);
Version of tested tools:
<package id="Microsoft.EntityFrameworkCore.Tools" version="1.0.0-preview2-final" targetFramework="net461" developmentDependency="true" />
source share