63 lines
4.2 KiB
C#
63 lines
4.2 KiB
C#
|
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<int>(type: "int", nullable: false)
|
|||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|||
|
Title = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false),
|
|||
|
Category = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|||
|
Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|||
|
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
|||
|
PromoPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
|||
|
Quantity = table.Column<long>(type: "bigint", nullable: false),
|
|||
|
Status = table.Column<int>(type: "int", nullable: false),
|
|||
|
ImageName = table.Column<string>(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, 29.99m, 1L, 4, "Ceinture flèchée" },
|
|||
|
{ 2, "Linge", "Parce que ça sent la coupe!", "pantouflesCH", 15.64m, 9.99m, 54L, 0, "Pantoufles du Canadien en Phentex" },
|
|||
|
{ 3, "Homme", "On ne lui ferait pas mal, en tout cas!!", "jeanlucmongrain", 1453.12m, 999.99m, 1L, 3, "Jean-Luc Mongrain" },
|
|||
|
{ 4, "Linge", "Tellement simple et comfortable.", "tshirt", 12.12m, 9.99m, 143L, 0, "T-Shirt" },
|
|||
|
{ 5, "Vêtement d'extérieur", "Deux pour un!", "mitaines", 8.18m, 6.99m, 1423L, 0, "Mitaines" },
|
|||
|
{ 6, "Vêtement d'extérieur", "Deux pour un!", "foulard", 10.56m, 8.99m, 14L, 4, "Foulard" },
|
|||
|
{ 7, "Sous-Vêtement", "Pour garder le p'tit bout au chaud.", "kokin", 15.45m, 12.99m, 144L, 4, "Jock-Strap en phentex" },
|
|||
|
{ 8, "Sous-Vêtement", "Pour garder l'absence de p'tit bout au chaud.", "kokin", 15.45m, 12.99m, 224L, 4, "Jock-Strap féminin en phentex" },
|
|||
|
{ 9, "Alien", "En chiffon.", "bibi", 1045.45m, 1023.99m, 1L, 3, "Bibi" },
|
|||
|
{ 10, "Vêtement d'extérieur", "En chiffon.", "tuque", 15.45m, 12.99m, 1L, 0, "Tuque en laine" },
|
|||
|
{ 11, "Vêtement d'extérieur", "Pour se faire taper dessus avec une poêle à frire tout en restant au chaud.", "bonhomme", 145.45m, 123.99m, 1L, 4, "Habit de Bonhomme Carnaval" },
|
|||
|
{ 12, "Autre", "Pour se pêter la fiole avec style.", "gauze", 145.45m, 123.99m, 0L, 1, "Gauze en phentex" },
|
|||
|
{ 13, "Homme", "En chiffon.", "jesus", 145.45m, 123.99m, 1L, 3, "Petit Jésus de plâtre" },
|
|||
|
{ 14, "Autre", "À écouter dans l'habit de Bonhomme Carnaval tant que possible.", "vhs", 3.45m, 1.99m, 164363L, 3, "VHS de la Guerre des Tuques" },
|
|||
|
{ 15, "Linge", "(N'est pas réellement pare-balle).", "chandailquetaine", 1435.45m, 1223.99m, 18L, 3, "Gilet pare-balle en laine" },
|
|||
|
{ 16, "Autre", "Pour s'éffoirer le nez dedans.", "doudou", 14.45m, 13.99m, 14L, 0, "Doudou" },
|
|||
|
{ 17, "Vêtements d'extérieur", "Pour avoir l'air thug en hiver.", "mitaines2", 9.45m, 8.99m, 16L, 0, "Mitaines pas de doigts" }
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Products");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|