// 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 System.Collections.Generic; using YTManager; namespace YTManager.Migrations { [DbContext(typeof(MediaDB))] [Migration("20180305052950_Made tags required")] partial class Madetagsrequired { 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("PrimaryKey") .ValueGeneratedOnAdd(); b.Property("AddedtoDB"); b.Property("Description") .IsRequired(); b.Property("Refreshed"); b.Property("ThumbnailURL") .IsRequired(); b.Property("Title") .IsRequired(); b.Property("UserTags") .IsRequired(); b.Property("YoutubeID") .IsRequired(); b.HasKey("PrimaryKey"); b.ToTable("Channels"); }); modelBuilder.Entity("YTManager.Models.Video", b => { b.Property("PrimaryKey") .ValueGeneratedOnAdd(); b.Property("AddedToYT"); b.Property("AddedtoDB"); b.Property("ChannelPrimaryKey"); b.Property("Description") .IsRequired(); b.Property("Duration"); b.Property>("Tags") .IsRequired(); b.Property("ThumbnailURL") .IsRequired(); b.Property("Title") .IsRequired(); b.Property("YoutubeID") .IsRequired(); b.HasKey("PrimaryKey"); b.HasIndex("ChannelPrimaryKey"); b.ToTable("Videos"); }); modelBuilder.Entity("YTManager.Models.Video", b => { b.HasOne("YTManager.Models.Channel", "Channel") .WithMany("Videos") .HasForeignKey("ChannelPrimaryKey") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 } } }