Updated deps (hangfire, dotnet core, aspnet core, etc) and squashed migrations

This commit is contained in:
2019-01-27 16:34:08 -05:00
parent 9b2ff546f0
commit 312dbdd8a5
14 changed files with 49 additions and 412 deletions

View File

@ -0,0 +1,72 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace YTManager.Migrations
{
public partial class initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Channels",
columns: table => new
{
PrimaryKey = table.Column<long>(nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
Title = table.Column<string>(nullable: false),
Description = table.Column<string>(nullable: false),
ThumbnailURL = table.Column<string>(nullable: false),
YoutubeID = table.Column<string>(nullable: false),
AddedtoDB = table.Column<DateTime>(nullable: false),
Refreshed = table.Column<DateTime>(nullable: false),
UserTags = table.Column<string[]>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Channels", x => x.PrimaryKey);
});
migrationBuilder.CreateTable(
name: "Videos",
columns: table => new
{
PrimaryKey = table.Column<long>(nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
Title = table.Column<string>(nullable: false),
Description = table.Column<string>(nullable: false),
YoutubeID = table.Column<string>(nullable: false),
ThumbnailURL = table.Column<string>(nullable: false),
AddedToYT = table.Column<DateTime>(nullable: false),
AddedtoDB = table.Column<DateTime>(nullable: false),
Duration = table.Column<TimeSpan>(nullable: false),
ChannelPrimaryKey = table.Column<long>(nullable: false),
Tags = table.Column<string[]>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Videos", x => x.PrimaryKey);
table.ForeignKey(
name: "FK_Videos_Channels_ChannelPrimaryKey",
column: x => x.ChannelPrimaryKey,
principalTable: "Channels",
principalColumn: "PrimaryKey",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Videos_ChannelPrimaryKey",
table: "Videos",
column: "ChannelPrimaryKey");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Videos");
migrationBuilder.DropTable(
name: "Channels");
}
}
}