Housewives/Housewives.Api/Migrations/20220906055340_InitialCreat...

102 lines
4.7 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Housewives.Api.Migrations
{
public partial class InitialCreate : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Housewives",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
Series = table.Column<string>(type: "nvarchar(max)", nullable: false),
ImageUrl = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Housewives", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Quotes",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
HousewifeId = table.Column<int>(type: "int", nullable: false),
Phrase = table.Column<string>(type: "nvarchar(max)", nullable: false),
Season = table.Column<int>(type: "int", nullable: false),
Episode = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Quotes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Tags",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Tags", x => x.Id);
});
migrationBuilder.InsertData(
table: "Housewives",
columns: new[] { "Id", "ImageUrl", "Name", "Series" },
values: new object[,]
{
{ 1, "https://i.dailymail.co.uk/1s/2022/06/02/08/58580139-10877237-image-a-10_1654154206127.jpg", "Chanel Ayan", "The Real Housewives of Dubai" },
{ 2, "https://imgix.bustle.com/uploads/image/2022/6/1/7cbf222b-98cf-4c0b-9643-483ef07f19b9-nup_196331_01313.JPG?w=800&fit=crop&crop=focalpoint&auto=format%2Ccompress&fp-x=0.5787&fp-y=0.22", "Sara Al Madani", "The Real Housewives of Dubai" },
{ 3, "https://www.bravotv.com/sites/bravo/files/media_mpx/thumbnails/bravo-video.nbcuni.com/image/NBCU_Bravo/561/911/161202_3434774_This_Is_How_Dorit_and_Lisa_Vanderpump_Became.jpg", "Lisa Vanderpump", "The Real Housewives of Beverly Hills" },
{ 4, "https://static.wikia.nocookie.net/realitytv-girl/images/4/42/Heather_Gay.jpg/revision/latest?cb=20210509144203", "Heathere Gay", "The Real Housewives of Salt Lake City" }
});
migrationBuilder.InsertData(
table: "Quotes",
columns: new[] { "Id", "Episode", "HousewifeId", "Phrase", "Season" },
values: new object[,]
{
{ 1, 9, 1, "But I'm going to enjoy my life just like I was born today.", 1 },
{ 2, 11, 1, "Be careful who you surround yourself with. You might pick their fashion sense.", 1 },
{ 3, 3, 2, "You're bleeding on people who did not cut you.", 1 },
{ 4, 0, 3, "I'm passionate about dogs, just not about crazy bitches.", 6 },
{ 5, 0, 3, "Life isn't all diamonds and rose, but it should be.", 3 },
{ 6, 4, 4, "For me, the fairytale is the be seen for exactly who I am, and to still be loved.", 1 }
});
migrationBuilder.InsertData(
table: "Tags",
columns: new[] { "Id", "Name" },
values: new object[,]
{
{ 1, "Advice" },
{ 2, "Funny" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Housewives");
migrationBuilder.DropTable(
name: "Quotes");
migrationBuilder.DropTable(
name: "Tags");
}
}
}