// 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("20170901083156_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("ChannelId") .ValueGeneratedOnAdd(); b.Property("Description") .IsRequired(); b.Property("ThumbnailURL") .IsRequired(); b.Property("Title") .IsRequired(); b.Property("YTChannelID") .IsRequired(); b.HasKey("ChannelId"); b.ToTable("Channels"); }); modelBuilder.Entity("YTManager.Models.Video", b => { b.Property("VideoId") .ValueGeneratedOnAdd(); b.Property("AddedtoDB"); b.Property("ChannelId"); b.Property("Description") .IsRequired(); b.Property("ThumbnailURL") .IsRequired(); b.Property("Title") .IsRequired(); b.Property("Uploaded"); b.Property("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 } } }