using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Bit.PostgresMigrations.Migrations; /// public partial class SendKeyAndDataNotNull : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.Sql("UPDATE \"Send\" SET \"Key\" = '' WHERE \"Key\" IS NULL;"); migrationBuilder.Sql("UPDATE \"Send\" SET \"Data\" = '' WHERE \"Data\" IS NULL;"); migrationBuilder.AlterColumn( name: "Key", table: "Send", type: "text", nullable: false, oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "Data", table: "Send", type: "text", nullable: false, oldClrType: typeof(string), oldType: "text", oldNullable: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Key", table: "Send", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "Data", table: "Send", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); } }