efcore.pg
efcore.pg copied to clipboard
.IsFixedLength() creates/alters varchar instead of char
Version 2.1.1
The following:
builder.Property(x => x.Password);
builder.Property(x => x.Salt).IsFixedLength();
will create a migration:
password = table.Column<string>(maxLength: 64, nullable: false),
salt = table.Column<string>(fixedLength: true, maxLength: 64, nullable: false),
The migration will create a table with:
password varchar(64) NOT NULL,
salt varchar(64) NOT NULL, <- This should be char(64).
Thanks for raising, fixed for 2.1.2.