efcore.pg icon indicating copy to clipboard operation
efcore.pg copied to clipboard

.IsFixedLength() creates/alters varchar instead of char

Open phristov opened this issue 8 years ago • 1 comments

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).

phristov avatar Jul 11 '18 04:07 phristov

Thanks for raising, fixed for 2.1.2.

roji avatar Jul 12 '18 20:07 roji