BackEnd/YTManager/Migrations/20170902220142_initial.Desi...

90 lines
2.7 KiB
C#

// <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;
using YTManager;
namespace YTManager.Migrations
{
[DbContext(typeof(MediaDB))]
[Migration("20170902220142_initial")]
partial class initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
.HasAnnotation("ProductVersion", "2.0.0-rtm-26452");
modelBuilder.Entity("YTManager.Models.Channel", b =>
{
b.Property<long>("ChannelId")
.ValueGeneratedOnAdd();
b.Property<string>("Description")
.IsRequired();
b.Property<string>("ThumbnailURL")
.IsRequired();
b.Property<string>("Title")
.IsRequired();
b.Property<string>("YTChannelID")
.IsRequired();
b.HasKey("ChannelId");
b.ToTable("Channels");
});
modelBuilder.Entity("YTManager.Models.Video", b =>
{
b.Property<long>("VideoId")
.ValueGeneratedOnAdd();
b.Property<DateTime>("AddedtoDB");
b.Property<long>("ChannelId");
b.Property<string>("Description")
.IsRequired();
b.Property<string>("ThumbnailURL")
.IsRequired();
b.Property<string>("Title")
.IsRequired();
b.Property<DateTime>("Uploaded");
b.Property<string>("YTChannelID")
.IsRequired();
b.Property<string>("YTVideoID")
.IsRequired();
b.HasKey("VideoId");
b.HasIndex("ChannelId");
b.ToTable("Videos");
});
modelBuilder.Entity("YTManager.Models.Video", b =>
{
b.HasOne("YTManager.Models.Channel", "Channel")
.WithMany("Videos")
.HasForeignKey("ChannelId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}