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), Category = table.Column(type: "nvarchar(max)", nullable: false), Description = table.Column(type: "nvarchar(max)", nullable: false), Price = table.Column(type: "decimal(18,2)", nullable: false), PromoPrice = table.Column(type: "decimal(18,2)", nullable: false), Quantity = table.Column(type: "bigint", nullable: false), Status = table.Column(type: "int", 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", "Category", "Description", "ImageName", "Price", "PromoPrice", "Quantity", "Status", "Title" }, values: new object[] { 1, "Linge", "Pour faire votre propre bonhomme de 1837, comme dans le bon vieux temps.", "ceintureflechee", 85.86m, 0m, 1L, 4, "Ceinture flèchée" }); migrationBuilder.InsertData( table: "Products", columns: new[] { "Id", "Category", "Description", "ImageName", "Price", "PromoPrice", "Quantity", "Status", "Title" }, values: new object[] { 2, "Linge", "Parce que ça sent la coupe!", "pantouflesCH", 15.64m, 0m, 54L, 0, "Pantoufles du Canadien en Phentex" }); migrationBuilder.InsertData( table: "Products", columns: new[] { "Id", "Category", "Description", "ImageName", "Price", "PromoPrice", "Quantity", "Status", "Title" }, values: new object[] { 3, "Homme", "On ne lui ferait pas mal, en tout cas!!", "jeanlucmongrain", 1453.12m, 0m, 1L, 3, "Jean-Luc Mongrain" }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Products"); } } }