2018-02-20 06:16:30 +00:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
|
|
|
|
using System;
|
2018-03-05 06:08:55 +00:00
|
|
|
|
using System.Collections.Generic;
|
2018-02-20 06:16:30 +00:00
|
|
|
|
using YTManager;
|
|
|
|
|
|
|
|
|
|
namespace YTManager.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(MediaDB))]
|
2018-03-05 06:08:55 +00:00
|
|
|
|
[Migration("20180304034317_initial")]
|
2018-02-24 06:10:12 +00:00
|
|
|
|
partial class initial
|
2018-02-20 06:16:30 +00:00
|
|
|
|
{
|
|
|
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
|
|
|
|
.HasAnnotation("ProductVersion", "2.0.1-rtm-125");
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("YTManager.Models.Channel", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<long>("PrimaryKey")
|
|
|
|
|
.ValueGeneratedOnAdd();
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("AddedtoDB");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Description")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("Refreshed");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ThumbnailURL")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Title")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2018-03-05 06:08:55 +00:00
|
|
|
|
b.Property<List<string>>("UserTags");
|
|
|
|
|
|
2018-02-20 06:16:30 +00:00
|
|
|
|
b.Property<string>("YoutubeID")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasKey("PrimaryKey");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Channels");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("YTManager.Models.Video", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<long>("PrimaryKey")
|
|
|
|
|
.ValueGeneratedOnAdd();
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("AddedToYT");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("AddedtoDB");
|
|
|
|
|
|
2018-03-05 06:08:55 +00:00
|
|
|
|
b.Property<long>("ChannelPrimaryKey");
|
2018-02-20 06:16:30 +00:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Description")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2018-03-05 06:08:55 +00:00
|
|
|
|
b.Property<TimeSpan>("Duration");
|
|
|
|
|
|
|
|
|
|
b.Property<List<string>>("Tags")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2018-02-20 06:16:30 +00:00
|
|
|
|
b.Property<string>("ThumbnailURL")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Title")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("YoutubeID")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasKey("PrimaryKey");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ChannelPrimaryKey");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Videos");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("YTManager.Models.Video", b =>
|
|
|
|
|
{
|
2018-03-05 06:08:55 +00:00
|
|
|
|
b.HasOne("YTManager.Models.Channel", "Channel")
|
2018-02-20 06:16:30 +00:00
|
|
|
|
.WithMany("Videos")
|
2018-03-05 06:08:55 +00:00
|
|
|
|
.HasForeignKey("ChannelPrimaryKey")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade);
|
2018-02-20 06:16:30 +00:00
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|