'Entity Framework Core 6 - ignoring annotations

I want to create a migration with EF Core 6 and I'm getting an error because in table in column password I already have hash string of password which is 32 chars long but my model has an annotation for max length = 20.

My question is: how can I make the migration ignore the StringLength annotation?

[Required]
[DataType(DataType.Password)]
[StringLength(20, MinimumLength = 3, ErrorMessage = "Password length must be between 3 and 20 characters long.")]
public string Password { get; set; }

Error:

Value too long for type character varying(20)

Database used is Postgres



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source