EnumType

Classes > Migration > EnumType

Database enumeration type with named values. Postgres: Creates actual ENUM type. SQL Server/SQLite: Maps to constrained string.

public sealed record EnumType : PortableType, IEquatable<PortableType>, IEquatable<EnumType>

Constructors

EnumType

public EnumType(string Name, IReadOnlyList<string> Values)

Database enumeration type with named values. Postgres: Creates actual ENUM type. SQL Server/SQLite: Maps to constrained string.

Parameter Type Description
Name String Enum type name for DDL
Values String> Allowed enum values in order

Properties

Name

public string Name { get; init; }

Enum type name for DDL

Values

public IReadOnlyList<string> Values { get; init; }

Allowed enum values in order