using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace AsbCloudDb.Migrations { public partial class Enable_nullable_on_setpoints_finalDocs : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.Sql("update t_setpoints_rquest set setpoint_set = '{}' where setpoint_set is null;"); migrationBuilder.AlterColumn( name: "setpoint_set", table: "t_setpoints_rquest", type: "jsonb", nullable: false, defaultValue: "{}", comment: "Набор уставок", oldClrType: typeof(string), oldType: "jsonb", oldNullable: true, oldComment: "Набор уставок"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "setpoint_set", table: "t_setpoints_rquest", type: "jsonb", nullable: true, comment: "Набор уставок", oldClrType: typeof(string), oldType: "jsonb", oldComment: "Набор уставок"); } } }