// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using RomRepoMgr.Database; namespace RomRepoMgr.Database.Migrations { [DbContext(typeof(Context))] [Migration("20200822130751_AddMachine")] partial class AddMachine { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "3.1.7"); modelBuilder.Entity("RomRepoMgr.Database.Models.DbFile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Crc32") .HasColumnType("TEXT") .HasMaxLength(8); b.Property("CreatedOn") .HasColumnType("TEXT"); b.Property("Md5") .HasColumnType("TEXT") .HasMaxLength(32); b.Property("Sha1") .HasColumnType("TEXT") .HasMaxLength(40); b.Property("Sha256") .HasColumnType("TEXT") .HasMaxLength(64); b.Property("Size") .HasColumnType("INTEGER"); b.Property("UpdatedOn") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Crc32"); b.HasIndex("Sha1"); b.HasIndex("Sha256"); b.HasIndex("Size"); b.ToTable("Files"); }); modelBuilder.Entity("RomRepoMgr.Database.Models.Machine", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedOn") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("RomSetId") .HasColumnType("INTEGER"); b.Property("UpdatedOn") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Name"); b.HasIndex("RomSetId"); b.ToTable("Machines"); }); modelBuilder.Entity("RomRepoMgr.Database.Models.RomSet", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Author") .HasColumnType("TEXT"); b.Property("Comment") .HasColumnType("TEXT"); b.Property("CreatedOn") .HasColumnType("TEXT"); b.Property("Date") .HasColumnType("TEXT"); b.Property("Description") .HasColumnType("TEXT"); b.Property("Filename") .IsRequired() .HasColumnType("TEXT"); b.Property("Homepage") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("Sha384") .IsRequired() .HasColumnType("TEXT") .HasMaxLength(96); b.Property("UpdatedOn") .HasColumnType("TEXT"); b.Property("Version") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Author"); b.HasIndex("Comment"); b.HasIndex("Date"); b.HasIndex("Description"); b.HasIndex("Filename"); b.HasIndex("Homepage"); b.HasIndex("Name"); b.HasIndex("Sha384"); b.HasIndex("Version"); b.ToTable("RomSets"); }); modelBuilder.Entity("RomRepoMgr.Database.Models.Machine", b => { b.HasOne("RomRepoMgr.Database.Models.RomSet", "RomSet") .WithMany("Machines") .HasForeignKey("RomSetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); #pragma warning restore 612, 618 } } }