Add-Migration
This commit is contained in:
		@@ -0,0 +1,525 @@
 | 
			
		||||
using System;
 | 
			
		||||
using Microsoft.EntityFrameworkCore.Migrations;
 | 
			
		||||
 | 
			
		||||
#nullable disable
 | 
			
		||||
 | 
			
		||||
namespace GrossesMitainesAPI.Migrations
 | 
			
		||||
{
 | 
			
		||||
    public partial class InitialDb : Migration
 | 
			
		||||
    {
 | 
			
		||||
        protected override void Up(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "AspNetRoles",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 | 
			
		||||
                    NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 | 
			
		||||
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_AspNetRoles", x => x.Id);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "AspNetUsers",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    FirstName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
 | 
			
		||||
                    LastName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
 | 
			
		||||
                    UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 | 
			
		||||
                    NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 | 
			
		||||
                    Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 | 
			
		||||
                    NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 | 
			
		||||
                    EmailConfirmed = table.Column<bool>(type: "bit", nullable: false),
 | 
			
		||||
                    PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
			
		||||
                    SecurityStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
			
		||||
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
			
		||||
                    PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
			
		||||
                    PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false),
 | 
			
		||||
                    TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false),
 | 
			
		||||
                    LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
 | 
			
		||||
                    LockoutEnabled = table.Column<bool>(type: "bit", nullable: false),
 | 
			
		||||
                    AccessFailedCount = table.Column<int>(type: "int", nullable: false)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_AspNetUsers", x => x.Id);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "ChargesModel",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    Id = table.Column<int>(type: "int", nullable: false)
 | 
			
		||||
                        .Annotation("SqlServer:Identity", "1, 1"),
 | 
			
		||||
                    Token = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
			
		||||
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
			
		||||
                    AmountInCents = table.Column<long>(type: "bigint", nullable: false),
 | 
			
		||||
                    CurrencyCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
			
		||||
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
			
		||||
                    Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
			
		||||
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: false)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_ChargesModel", x => x.Id);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            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),
 | 
			
		||||
                    Hits = table.Column<long>(type: "bigint", nullable: false),
 | 
			
		||||
                    Sales = table.Column<long>(type: "bigint", nullable: false),
 | 
			
		||||
                    LastSale = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
			
		||||
                    LastHit = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
			
		||||
                    ImageName = table.Column<string>(type: "nvarchar(max)", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_Products", x => x.Id);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "AspNetRoleClaims",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    Id = table.Column<int>(type: "int", nullable: false)
 | 
			
		||||
                        .Annotation("SqlServer:Identity", "1, 1"),
 | 
			
		||||
                    RoleId = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
			
		||||
                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
 | 
			
		||||
                        column: x => x.RoleId,
 | 
			
		||||
                        principalTable: "AspNetRoles",
 | 
			
		||||
                        principalColumn: "Id",
 | 
			
		||||
                        onDelete: ReferentialAction.Cascade);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "Addresses",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    Id = table.Column<int>(type: "int", nullable: false)
 | 
			
		||||
                        .Annotation("SqlServer:Identity", "1, 1"),
 | 
			
		||||
                    CivicNumber = table.Column<int>(type: "int", nullable: false),
 | 
			
		||||
                    Appartment = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
			
		||||
                    Street = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
 | 
			
		||||
                    City = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
 | 
			
		||||
                    Province = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: false),
 | 
			
		||||
                    Country = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
 | 
			
		||||
                    PostalCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
			
		||||
                    InventoryUserId = table.Column<string>(type: "nvarchar(450)", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_Addresses", x => x.Id);
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_Addresses_AspNetUsers_InventoryUserId",
 | 
			
		||||
                        column: x => x.InventoryUserId,
 | 
			
		||||
                        principalTable: "AspNetUsers",
 | 
			
		||||
                        principalColumn: "Id");
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "AspNetUserClaims",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    Id = table.Column<int>(type: "int", nullable: false)
 | 
			
		||||
                        .Annotation("SqlServer:Identity", "1, 1"),
 | 
			
		||||
                    UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
			
		||||
                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_AspNetUserClaims_AspNetUsers_UserId",
 | 
			
		||||
                        column: x => x.UserId,
 | 
			
		||||
                        principalTable: "AspNetUsers",
 | 
			
		||||
                        principalColumn: "Id",
 | 
			
		||||
                        onDelete: ReferentialAction.Cascade);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "AspNetUserLogins",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    ProviderKey = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    ProviderDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 | 
			
		||||
                    UserId = table.Column<string>(type: "nvarchar(450)", nullable: false)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_AspNetUserLogins_AspNetUsers_UserId",
 | 
			
		||||
                        column: x => x.UserId,
 | 
			
		||||
                        principalTable: "AspNetUsers",
 | 
			
		||||
                        principalColumn: "Id",
 | 
			
		||||
                        onDelete: ReferentialAction.Cascade);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "AspNetUserRoles",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    RoleId = table.Column<string>(type: "nvarchar(450)", nullable: false)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
 | 
			
		||||
                        column: x => x.RoleId,
 | 
			
		||||
                        principalTable: "AspNetRoles",
 | 
			
		||||
                        principalColumn: "Id",
 | 
			
		||||
                        onDelete: ReferentialAction.Cascade);
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_AspNetUserRoles_AspNetUsers_UserId",
 | 
			
		||||
                        column: x => x.UserId,
 | 
			
		||||
                        principalTable: "AspNetUsers",
 | 
			
		||||
                        principalColumn: "Id",
 | 
			
		||||
                        onDelete: ReferentialAction.Cascade);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "AspNetUserTokens",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    Name = table.Column<string>(type: "nvarchar(450)", nullable: false),
 | 
			
		||||
                    Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_AspNetUserTokens_AspNetUsers_UserId",
 | 
			
		||||
                        column: x => x.UserId,
 | 
			
		||||
                        principalTable: "AspNetUsers",
 | 
			
		||||
                        principalColumn: "Id",
 | 
			
		||||
                        onDelete: ReferentialAction.Cascade);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "Invoices",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    Id = table.Column<int>(type: "int", nullable: false)
 | 
			
		||||
                        .Annotation("SqlServer:Identity", "1, 1"),
 | 
			
		||||
                    FirstName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
 | 
			
		||||
                    LastName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
 | 
			
		||||
                    PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
			
		||||
                    EmailAddress = table.Column<string>(type: "nvarchar(max)", nullable: false),
 | 
			
		||||
                    LinkedAccountId = table.Column<string>(type: "nvarchar(450)", nullable: true),
 | 
			
		||||
                    PurchaseDate = table.Column<DateTime>(type: "datetime2", nullable: false),
 | 
			
		||||
                    ShippingAddressId = table.Column<int>(type: "int", nullable: false),
 | 
			
		||||
                    Status = table.Column<int>(type: "int", nullable: false),
 | 
			
		||||
                    PaymentId = table.Column<int>(type: "int", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_Invoices", x => x.Id);
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_Invoices_Addresses_ShippingAddressId",
 | 
			
		||||
                        column: x => x.ShippingAddressId,
 | 
			
		||||
                        principalTable: "Addresses",
 | 
			
		||||
                        principalColumn: "Id",
 | 
			
		||||
                        onDelete: ReferentialAction.Cascade);
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_Invoices_AspNetUsers_LinkedAccountId",
 | 
			
		||||
                        column: x => x.LinkedAccountId,
 | 
			
		||||
                        principalTable: "AspNetUsers",
 | 
			
		||||
                        principalColumn: "Id");
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_Invoices_ChargesModel_PaymentId",
 | 
			
		||||
                        column: x => x.PaymentId,
 | 
			
		||||
                        principalTable: "ChargesModel",
 | 
			
		||||
                        principalColumn: "Id");
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "ProductInvoice",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    Id = table.Column<int>(type: "int", nullable: false)
 | 
			
		||||
                        .Annotation("SqlServer:Identity", "1, 1"),
 | 
			
		||||
                    ProductId = table.Column<int>(type: "int", nullable: false),
 | 
			
		||||
                    Quantity = table.Column<long>(type: "bigint", nullable: false),
 | 
			
		||||
                    InvoiceModelId = table.Column<int>(type: "int", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("PK_ProductInvoice", x => x.Id);
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_ProductInvoice_Invoices_InvoiceModelId",
 | 
			
		||||
                        column: x => x.InvoiceModelId,
 | 
			
		||||
                        principalTable: "Invoices",
 | 
			
		||||
                        principalColumn: "Id");
 | 
			
		||||
                    table.ForeignKey(
 | 
			
		||||
                        name: "FK_ProductInvoice_Products_ProductId",
 | 
			
		||||
                        column: x => x.ProductId,
 | 
			
		||||
                        principalTable: "Products",
 | 
			
		||||
                        principalColumn: "Id",
 | 
			
		||||
                        onDelete: ReferentialAction.Cascade);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "Addresses",
 | 
			
		||||
                columns: new[] { "Id", "Appartment", "City", "CivicNumber", "Country", "InventoryUserId", "PostalCode", "Province", "Street" },
 | 
			
		||||
                values: new object[] { 2, null, "Saint-Jérôme", 420, "Canada", null, "H0H0H0", "QC", "Rue MikeWard" });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "AspNetRoles",
 | 
			
		||||
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
 | 
			
		||||
                values: new object[,]
 | 
			
		||||
                {
 | 
			
		||||
                    { "1b7b9c55-c746-493a-a24f-3d5ca937298e", "fb8da1f2-a9df-4faa-9786-259cbc8c6f1c", "Client", "CLIENT" },
 | 
			
		||||
                    { "c9e08b20-d8a5-473f-9f52-572eb23c12af", "eac9c483-2e9f-4f9e-9b97-dc1c761f76c2", "Administrateur", "ADMINISTRATEUR" }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "AspNetUsers",
 | 
			
		||||
                columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "Email", "EmailConfirmed", "FirstName", "LastName", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UserName" },
 | 
			
		||||
                values: new object[,]
 | 
			
		||||
                {
 | 
			
		||||
                    { "af9178c8-1a02-4ff8-bc0a-c8248dad6e09", 0, "b7103a3b-8f05-462d-9fc0-5d4faa4669dc", "paul@exemple.com", false, "Paul", "A.", false, null, "PAUL@EXEMPLE.COM", "PASLA", "AQAAAAEAACcQAAAAEN68b+gEQV5Vx2grBL94+BzugXFrgXko6KtdY3p/NJN17mk8QCpGlQfJ3BMe040+dg==", "222-222-2222", false, "99183d90-1f1c-4a8e-9891-ea8ab3b714d0", false, "PasLa" },
 | 
			
		||||
                    { "ecf7503a-591c-454e-a824-048e10bd0474", 0, "61f3249f-495f-48c8-ac7e-7d21b3da82c7", "admin@admin.com", false, "Roger", "Admin", false, null, "ADMIN@ADMIN.COM", "ADMIN", "AQAAAAEAACcQAAAAELswgBNsSfJwmigdKX2rpHseOEi20F+ZUhxapu80HTnxZamC3lu1hyAGMXj4kQumMw==", "111-111-1111", false, "3098997b-a081-41ec-aa08-6cdea0028db7", false, "Admin" }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "Products",
 | 
			
		||||
                columns: new[] { "Id", "Category", "Description", "Hits", "ImageName", "LastHit", "LastSale", "Price", "PromoPrice", "Quantity", "Sales", "Status", "Title" },
 | 
			
		||||
                values: new object[,]
 | 
			
		||||
                {
 | 
			
		||||
                    { 1, "Linge", "Pour faire votre propre bonhomme de 1837, comme dans le bon vieux temps.", 0L, "$ceintureflechee.jpg", null, null, 85.86m, 29.99m, 1L, 0L, 4, "Ceinture flèchée" },
 | 
			
		||||
                    { 2, "Linge", "Parce que ça sent la coupe!", 0L, "$pantouflesCH.jpg", null, null, 15.64m, 9.99m, 54L, 0L, 0, "Pantoufles du Canadien en Phentex" },
 | 
			
		||||
                    { 3, "Homme", "On ne lui ferait pas mal, en tout cas!!", 0L, "$jeanlucmongrain.jpg", null, null, 1453.12m, 999.99m, 1L, 0L, 3, "Jean-Luc Mongrain" },
 | 
			
		||||
                    { 4, "Linge", "Tellement simple et comfortable.", 0L, "$tshirt.jpg", null, null, 12.12m, 9.99m, 143L, 0L, 0, "T-Shirt" },
 | 
			
		||||
                    { 5, "Vêtement d'extérieur", "Deux pour un!", 0L, "$mitaines.jpg", null, null, 8.18m, 6.99m, 1423L, 0L, 0, "Mitaines" },
 | 
			
		||||
                    { 6, "Vêtement d'extérieur", "Deux pour un!", 0L, "$foulard.jpg", null, null, 10.56m, 8.99m, 14L, 0L, 4, "Foulard" },
 | 
			
		||||
                    { 7, "Sous-Vêtement", "Pour garder le p'tit bout au chaud.", 0L, "$kokin.jpg", null, null, 15.45m, 12.99m, 144L, 0L, 4, "Jock-Strap en phentex" },
 | 
			
		||||
                    { 8, "Sous-Vêtement", "Pour garder l'absence de p'tit bout au chaud.", 0L, "$kokinfemme.jpg", null, null, 15.45m, 12.99m, 224L, 0L, 4, "Jock-Strap féminin en phentex" },
 | 
			
		||||
                    { 9, "Alien", "En chiffon.", 0L, "$bibi.jpg", null, null, 1045.45m, 1023.99m, 1L, 0L, 3, "Bibi" },
 | 
			
		||||
                    { 10, "Vêtement d'extérieur", "En chiffon.", 0L, "$tuque.jpg", null, null, 15.45m, 12.99m, 1L, 0L, 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.", 0L, "$bonhomme.jpg", null, null, 145.45m, 123.99m, 1L, 0L, 4, "Habit de Bonhomme Carnaval" },
 | 
			
		||||
                    { 12, "Autre", "Pour se pêter la fiole avec style.", 0L, "$gauze.jpg", null, null, 145.45m, 123.99m, 0L, 0L, 1, "Gauze en phentex" },
 | 
			
		||||
                    { 13, "Homme", "En chiffon.", 0L, "$jesus.jpg", null, null, 145.45m, 123.99m, 1L, 0L, 3, "Petit Jésus de plâtre" },
 | 
			
		||||
                    { 14, "Autre", "À écouter dans l'habit de Bonhomme Carnaval tant que possible.", 0L, "$vhs.jpg", null, null, 3.45m, 1.99m, 99L, 0L, 3, "VHS de la Guerre des Tuques" },
 | 
			
		||||
                    { 15, "Linge", "(N'est pas réellement pare-balle).", 0L, "$chandailquetaine.jpg", null, null, 1435.45m, 1223.99m, 18L, 0L, 3, "Gilet pare-balle en laine" },
 | 
			
		||||
                    { 16, "Autre", "Pour s'éffoirer le nez dedans.", 0L, "$doudou.jpg", null, null, 14.45m, 13.99m, 14L, 0L, 0, "Doudou" },
 | 
			
		||||
                    { 17, "Vêtements d'extérieur", "Pour avoir l'air thug en hiver.", 0L, "$mitaines2.jpg", null, null, 9.45m, 8.99m, 16L, 0L, 0, "Mitaines pas de doigts" },
 | 
			
		||||
                    { 18, "Vêtements d'extérieur", "Pour avoir plus l'air thug en hiver.", 0L, "$longmitaines.jpg", null, null, 10.45m, 9.99m, 10L, 0L, 5, "Longues mitaines pas de doigts" },
 | 
			
		||||
                    { 19, "Linge", "Pour les journées bs", 0L, "$pantalon.jpg", null, null, 69.99m, 49.99m, 0L, 0L, 1, "Pantalons slacks" },
 | 
			
		||||
                    { 20, "Linge", "Pour commencer à apprendre rust et utiliser linux", 0L, "$thighs.jpg", null, null, 23.50m, 19.99m, 3L, 0L, 4, "Programmer Socks" },
 | 
			
		||||
                    { 21, "Linge", "Show off que t'habites su'l plateau", 0L, "$plateau.png", null, null, 149.99m, 99.99m, 14L, 0L, 0, "Col-roulé" },
 | 
			
		||||
                    { 22, "Linge", "Ben oui je vais à l'UQAM comment t'as d'viné", 0L, "$uqam.jpg", null, null, 149.99m, 99.99m, 4L, 0L, 3, "Gros col-roulé" },
 | 
			
		||||
                    { 23, "Établissement", "Oui oui, une SAQ au complete", 0L, "$saq.jpg", null, null, 1000000.99m, 999999.99m, 1L, 0L, 0, "SAQ" },
 | 
			
		||||
                    { 24, "Texte", "Lorem ipsum dolor sit amet, \r\nconsectetur adipiscing elit. Vivamus sapien ipsum, \r\nconvallis quis justo ac, congue sollicitudin metus. \r\nVestibulum nec libero nulla. Integer a pretium dolor. \r\nPhasellus vulputate iaculis ligula, sit amet suscipit \r\ndiam condimentum eu. Suspendisse blandit ipsum sed porttitor volutpat.\r\nDuis iaculis mauris a dapibus bibendum. Integer sollicitudin nunc et neque\r\negestas sagittis. Etiam vitae ornare ex.", 0L, "$lorem.jpg", null, null, 0.99m, 0.69m, 99L, 0L, 4, "Lorem" },
 | 
			
		||||
                    { 25, "Homme", "Quand un vrai coûte trop cher", 0L, "$bebe.jpg", null, null, 10.99m, 5.99m, 15L, 0L, 0, "Bébé de laine" },
 | 
			
		||||
                    { 26, "Linge", "Un beau petit kit pas cher quand vous avez oublié le cadeau pour le shower qui s'en vient", 0L, "$kitbebe.jpg", null, null, 39.99m, 29.99m, 10L, 0L, 3, "Kit pour bébé" },
 | 
			
		||||
                    { 27, "Linge", "Chris Pratt aime ben sauter dessus", 0L, "$koopa.jpg", null, null, 29.99m, 9.99m, 0L, 0L, 5, "TORTUE" },
 | 
			
		||||
                    { 28, "Nourriture", "*ne pa manger", 0L, "$potato.jpg", null, null, 1.99m, 0.99m, 58L, 0L, 0, "Patate de laine" },
 | 
			
		||||
                    { 29, "Animal", "Les singes sont des mammifères de l'ordre des primates, généralement arboricoles, à la face souvent glabre et caractérisés par un encéphale développé et de longs membres terminés par des doigts. Bien que leur ressemblance avec l'Homme ait toujours frappé les esprits, la science a mis de nombreux siècles à prouver le lien étroit qui existe entre ceux-ci et l'espèce humaine.\r\n\r\nAu sein des primates, les singes forment un infra-ordre monophylétique, si l'on y inclut le genre Homo, nommé Simiiformes et qui se divise entre les Platyrhiniens (singes du Nouveau Monde : Amérique centrale et méridionale) et les Catarhiniens (singes de l'Ancien Monde : Afrique et Asie tropicales). Ces derniers comprennent les hominoïdes, également appelés « grands singes », dont fait partie Homo sapiens et ses ancêtres les plus proches.\r\n\r\nMême s'il ne fait plus de doute aujourd'hui que « l'Homme est un singe comme les autres », l'expression est majoritairement utilisée pour parler des animaux sauvages, et évoque un référentiel culturel, littéraire et artistique qui exclut l'espèce humaine.", 0L, "$monke.png", null, null, 299.99m, 99.99m, 58L, 0L, 0, "Monke :)" },
 | 
			
		||||
                    { 30, "Pokemon", "It evolves from Pichu when leveled up with high friendship and evolves into Raichu when exposed to a Thunder Stone.\r\n\r\nIn Alola, Pikachu will evolve into Alolan Raichu when exposed to a Thunder Stone.\r\n\r\nPikachu has a Gigantamax form. Pikachu with the Gigantamax Factor cannot evolve.\r\n\r\nIn Pokémon Yellow, the starter Pikachu will refuse to evolve into Raichu unless it is traded and evolved on another save file. In Pokémon: Let's Go, Pikachu!, the player's starter Pikachu also will not evolve, but cannot be traded to become a Raichu.\r\n\r\nPikachu is popularly known as the mascot of the Pokémon franchise and one of Nintendo's major mascots.\r\n\r\nIt is also the game mascot and starter Pokémon of Pokémon Yellow and Let's Go, Pikachu!. It has made numerous appearances on the boxes of spin-off titles.\r\n\r\nPikachu is also the starter Pokémon of Pokémon Rumble Blast and Pokémon Rumble World.", 0L, "$pika.png", null, null, 3.99m, 2.99m, 69L, 0L, 5, "Phat Pikachu" }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "Addresses",
 | 
			
		||||
                columns: new[] { "Id", "Appartment", "City", "CivicNumber", "Country", "InventoryUserId", "PostalCode", "Province", "Street" },
 | 
			
		||||
                values: new object[,]
 | 
			
		||||
                {
 | 
			
		||||
                    { 1, "B", "Saint-Chrysostome", 1234, "Canada", "ecf7503a-591c-454e-a824-048e10bd0474", "H0H0H0", "QC", "Rue Pierre-Falardeau" },
 | 
			
		||||
                    { 3, "A", "Saint-Québec", 69, "Canada", "af9178c8-1a02-4ff8-bc0a-c8248dad6e09", "H0H0H0", "QC", "Rue PSPP" }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "AspNetUserRoles",
 | 
			
		||||
                columns: new[] { "RoleId", "UserId" },
 | 
			
		||||
                values: new object[,]
 | 
			
		||||
                {
 | 
			
		||||
                    { "1b7b9c55-c746-493a-a24f-3d5ca937298e", "af9178c8-1a02-4ff8-bc0a-c8248dad6e09" },
 | 
			
		||||
                    { "1b7b9c55-c746-493a-a24f-3d5ca937298e", "ecf7503a-591c-454e-a824-048e10bd0474" },
 | 
			
		||||
                    { "c9e08b20-d8a5-473f-9f52-572eb23c12af", "ecf7503a-591c-454e-a824-048e10bd0474" }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "Invoices",
 | 
			
		||||
                columns: new[] { "Id", "EmailAddress", "FirstName", "LastName", "LinkedAccountId", "PaymentId", "PhoneNumber", "PurchaseDate", "ShippingAddressId", "Status" },
 | 
			
		||||
                values: new object[] { 6, "test@admin.com", "Jérémy", "Le Petit", null, null, "111-111-1111", new DateTime(2022, 12, 4, 9, 8, 50, 6, DateTimeKind.Local).AddTicks(9344), 2, 0 });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "Invoices",
 | 
			
		||||
                columns: new[] { "Id", "EmailAddress", "FirstName", "LastName", "LinkedAccountId", "PaymentId", "PhoneNumber", "PurchaseDate", "ShippingAddressId", "Status" },
 | 
			
		||||
                values: new object[,]
 | 
			
		||||
                {
 | 
			
		||||
                    { 1, "admin@admin.com", "Roger", "Admin", "ecf7503a-591c-454e-a824-048e10bd0474", null, "111-111-1111", new DateTime(2022, 12, 4, 9, 8, 50, 6, DateTimeKind.Local).AddTicks(9261), 1, 0 },
 | 
			
		||||
                    { 2, "admin@admin.com", "Roger", "Admin", "ecf7503a-591c-454e-a824-048e10bd0474", null, "111-111-1111", new DateTime(2022, 12, 4, 9, 8, 50, 6, DateTimeKind.Local).AddTicks(9300), 1, 1 },
 | 
			
		||||
                    { 3, "admin@admin.com", "Roger", "Admin", "ecf7503a-591c-454e-a824-048e10bd0474", null, "111-111-1111", new DateTime(2022, 12, 4, 9, 8, 50, 6, DateTimeKind.Local).AddTicks(9327), 1, 3 },
 | 
			
		||||
                    { 4, "admin@admin.com", "Roger", "Admin", "ecf7503a-591c-454e-a824-048e10bd0474", null, "111-111-1111", new DateTime(2022, 12, 4, 9, 8, 50, 6, DateTimeKind.Local).AddTicks(9333), 1, 4 },
 | 
			
		||||
                    { 5, "admin@admin.com", "Roger", "Admin", "ecf7503a-591c-454e-a824-048e10bd0474", null, "111-111-1111", new DateTime(2022, 12, 4, 9, 8, 50, 6, DateTimeKind.Local).AddTicks(9338), 1, 5 },
 | 
			
		||||
                    { 7, "paul@exemple.com", "Paul", "A.", "af9178c8-1a02-4ff8-bc0a-c8248dad6e09", null, "111-111-1111", new DateTime(2022, 12, 4, 9, 8, 50, 6, DateTimeKind.Local).AddTicks(9357), 3, 3 }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "ProductInvoice",
 | 
			
		||||
                columns: new[] { "Id", "InvoiceModelId", "ProductId", "Quantity" },
 | 
			
		||||
                values: new object[] { 16, 6, 20, 4L });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.InsertData(
 | 
			
		||||
                table: "ProductInvoice",
 | 
			
		||||
                columns: new[] { "Id", "InvoiceModelId", "ProductId", "Quantity" },
 | 
			
		||||
                values: new object[,]
 | 
			
		||||
                {
 | 
			
		||||
                    { 1, 1, 1, 2L },
 | 
			
		||||
                    { 2, 1, 4, 5L },
 | 
			
		||||
                    { 3, 2, 3, 1L },
 | 
			
		||||
                    { 4, 2, 5, 2L },
 | 
			
		||||
                    { 5, 2, 7, 1L },
 | 
			
		||||
                    { 6, 3, 9, 1L },
 | 
			
		||||
                    { 7, 3, 11, 1L },
 | 
			
		||||
                    { 8, 4, 14, 1L },
 | 
			
		||||
                    { 9, 4, 13, 1L },
 | 
			
		||||
                    { 10, 4, 16, 1L },
 | 
			
		||||
                    { 11, 4, 24, 25L },
 | 
			
		||||
                    { 12, 5, 25, 1L },
 | 
			
		||||
                    { 13, 5, 29, 1L },
 | 
			
		||||
                    { 14, 5, 30, 1L },
 | 
			
		||||
                    { 15, 5, 15, 2L },
 | 
			
		||||
                    { 17, 7, 1, 1L },
 | 
			
		||||
                    { 18, 7, 15, 2L }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_Addresses_InventoryUserId",
 | 
			
		||||
                table: "Addresses",
 | 
			
		||||
                column: "InventoryUserId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_AspNetRoleClaims_RoleId",
 | 
			
		||||
                table: "AspNetRoleClaims",
 | 
			
		||||
                column: "RoleId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "RoleNameIndex",
 | 
			
		||||
                table: "AspNetRoles",
 | 
			
		||||
                column: "NormalizedName",
 | 
			
		||||
                unique: true,
 | 
			
		||||
                filter: "[NormalizedName] IS NOT NULL");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_AspNetUserClaims_UserId",
 | 
			
		||||
                table: "AspNetUserClaims",
 | 
			
		||||
                column: "UserId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_AspNetUserLogins_UserId",
 | 
			
		||||
                table: "AspNetUserLogins",
 | 
			
		||||
                column: "UserId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_AspNetUserRoles_RoleId",
 | 
			
		||||
                table: "AspNetUserRoles",
 | 
			
		||||
                column: "RoleId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "EmailIndex",
 | 
			
		||||
                table: "AspNetUsers",
 | 
			
		||||
                column: "NormalizedEmail");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "UserNameIndex",
 | 
			
		||||
                table: "AspNetUsers",
 | 
			
		||||
                column: "NormalizedUserName",
 | 
			
		||||
                unique: true,
 | 
			
		||||
                filter: "[NormalizedUserName] IS NOT NULL");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_Invoices_LinkedAccountId",
 | 
			
		||||
                table: "Invoices",
 | 
			
		||||
                column: "LinkedAccountId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_Invoices_PaymentId",
 | 
			
		||||
                table: "Invoices",
 | 
			
		||||
                column: "PaymentId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_Invoices_ShippingAddressId",
 | 
			
		||||
                table: "Invoices",
 | 
			
		||||
                column: "ShippingAddressId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_ProductInvoice_InvoiceModelId",
 | 
			
		||||
                table: "ProductInvoice",
 | 
			
		||||
                column: "InvoiceModelId");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "IX_ProductInvoice_ProductId",
 | 
			
		||||
                table: "ProductInvoice",
 | 
			
		||||
                column: "ProductId");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override void Down(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "AspNetRoleClaims");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "AspNetUserClaims");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "AspNetUserLogins");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "AspNetUserRoles");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "AspNetUserTokens");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "ProductInvoice");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "AspNetRoles");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "Invoices");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "Products");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "Addresses");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "ChargesModel");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "AspNetUsers");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user