using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace EF_ChangeLog.Migrations { /// public partial class initialize : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "StockChangeLogs", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EntityName = table.Column(type: "nvarchar(max)", nullable: false), EntityId = table.Column(type: "int", nullable: false), ChangeBy = table.Column(type: "nvarchar(max)", nullable: false), ChangeDate = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_StockChangeLogs", x => x.Id); }); migrationBuilder.CreateTable( name: "Stocks", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(max)", nullable: false), Price = table.Column(type: "decimal(18,2)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Stocks", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "StockChangeLogs"); migrationBuilder.DropTable( name: "Stocks"); } } }