Код: Выделить всё
internal class EventStackFilter
{
// other properties omitted
public List Statuses { get; set; } = [];
}
Код: Выделить всё
services.AddDbContext(options =>
{
options.UseNpgsql(
CreateConnString(variables.DatabaseName),
npsqlOptions =>
{
npsqlOptions.UseQuerySplittingBehavior(QuerySplittingBehavior.SingleQuery);
npsqlOptions.MapEnum();
npsqlOptions.MapEnum();
});
options.UseDataSeeding();
options.ConfigureWarnings(c => c.Log((RelationalEventId.CommandExecuted, LogLevel.Debug)));
}, ServiceLifetime.Transient);
Код: Выделить всё
migrationBuilder.AlterDatabase()
.Annotation("Npgsql:Enum:data_point_command_execution_state", "completed,failed,in_progress,none,unknown")
.Annotation("Npgsql:Enum:event_stack_event_status", "closed,new,taken,unknown")
.OldAnnotation("Npgsql:Enum:data_point_command_execution_state", "completed,failed,in_progress,none,unknown");
migrationBuilder.CreateTable(
name: "event_stack_filters",
columns: table => new
{
//other irrelevant properties
statuses = table.Column(type: "event_stack_event_status[]", nullable: false)
},
System.NotSupportedException: имя типа данных
'_event_stack_event_status' отсутствует в вашей базе данных. Возможно,
нужно установить расширение или обновиться до более новой версии.
Я не знаю, что я здесь делаю не так
Подробнее здесь: https://stackoverflow.com/questions/798 ... esql-array
Мобильная версия