using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Hcs.WebApp.Data.Hcs.Migrations { /// public partial class AddOperation : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "Name", table: "Registries", type: "nvarchar(max)", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "UpdatedAt", table: "Registries", type: "datetime2", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.CreateTable( name: "Operations", columns: table => new { Id = table.Column(type: "nvarchar(450)", nullable: false), Type = table.Column(type: "nvarchar(max)", nullable: false), InitiatorId = table.Column(type: "nvarchar(max)", nullable: false), StartedAt = table.Column(type: "datetime2", nullable: false), EndedAt = table.Column(type: "datetime2", nullable: true), MessageGuid = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Operations", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Operations"); migrationBuilder.DropColumn( name: "Name", table: "Registries"); migrationBuilder.DropColumn( name: "UpdatedAt", table: "Registries"); } } }