using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace GrossesMitainesAPI.Migrations { public partial class InitialDb : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Products", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Title = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false), Description = table.Column(type: "nvarchar(max)", nullable: false), Price = table.Column(type: "decimal(18,2)", nullable: false), ImageName = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Products", x => x.Id); }); migrationBuilder.InsertData( table: "Products", columns: new[] { "Id", "Description", "ImageName", "Price", "Title" }, values: new object[] { 1, "Pour faire votre propre bonhomme de 1837, comme dans le bon vieux temps.", "ceintureflechee", 85.86m, "Ceinture flèchée" }); migrationBuilder.InsertData( table: "Products", columns: new[] { "Id", "Description", "ImageName", "Price", "Title" }, values: new object[] { 2, "Parce que ça sent la coupe!", "pantouflesCH", 15.64m, "Pantoufles du Canadien en Phentex" }); migrationBuilder.InsertData( table: "Products", columns: new[] { "Id", "Description", "ImageName", "Price", "Title" }, values: new object[] { 3, "On ne lui ferait pas mal, en tout cas!!", "jeanlucmongrain", 1453.12m, "Jean-Luc Mongrain" }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Products"); } } }