Regex in MigrationsIdGenerator doesn't work for longer strings #20706
Labels
area-migrations
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
If you have a prefix longer than "yyyyMMddHHmmss".Length, then the Regex doesn't work as expected.
Steps to reproduce
Call this:
MigrationsIdGenerator.GetName("12345678901234567_InitialCreate");
One gets
67_InitialCreate
instead ofInitialCreate
.Call this:
MigrationsIdGenerator.IsValidId("12345678901234567_InitialCreate");
The Regex should pay attention to the start of the string.
If not, it will incorrectly validate the longer number instead of rejecting it.
Further technical details
EF Core version: 3.1.3
Database provider: not relevant
Target framework: .NET Core 3.1
Operating system: not relevant
IDE: not relevant
The text was updated successfully, but these errors were encountered: