Files
romrepomgr/RomRepoMgr.Database/Migrations/ContextModelSnapshot.cs

419 lines
13 KiB
C#
Raw Normal View History

2020-08-21 23:21:01 +01:00
// <auto-generated />
2020-08-21 23:32:44 +01:00
using System;
2020-08-21 23:21:01 +01:00
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
2020-09-06 19:09:35 +01:00
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RomRepoMgr.Database;
2020-08-21 23:21:01 +01:00
namespace RomRepoMgr.Database.Migrations
{
[DbContext(typeof(Context))]
2020-09-06 19:09:35 +01:00
partial class ContextModelSnapshot : ModelSnapshot
2020-08-21 23:21:01 +01:00
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
2020-09-06 19:09:35 +01:00
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.7");
2020-08-21 23:32:44 +01:00
2020-09-04 02:12:38 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.DbDisk", b =>
2020-09-06 19:09:35 +01:00
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("CreatedOn")
.HasColumnType("TEXT");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<bool>("IsInRepo")
.HasColumnType("INTEGER");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Md5")
.HasColumnType("TEXT")
.HasMaxLength(32);
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("OriginalFileName")
.HasColumnType("TEXT");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Sha1")
.HasColumnType("TEXT")
.HasMaxLength(40);
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<ulong?>("Size")
.HasColumnType("INTEGER");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("UpdatedOn")
.HasColumnType("TEXT");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.HasKey("Id");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("IsInRepo");
2020-09-04 22:27:05 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Md5");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Sha1");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Size");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.ToTable("Disks");
});
2020-09-04 02:12:38 +01:00
2020-08-21 23:32:44 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.DbFile", b =>
2020-09-06 19:09:35 +01:00
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Crc32")
.HasColumnType("TEXT")
.HasMaxLength(8);
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("CreatedOn")
.HasColumnType("TEXT");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.Property<bool>("IsInRepo")
.HasColumnType("INTEGER");
2020-08-23 20:10:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Md5")
.HasColumnType("TEXT")
.HasMaxLength(32);
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("OriginalFileName")
.HasColumnType("TEXT");
2020-09-04 01:08:51 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Sha1")
.HasColumnType("TEXT")
.HasMaxLength(40);
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Sha256")
.HasColumnType("TEXT")
.HasMaxLength(64);
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Sha384")
.HasColumnType("TEXT")
.HasMaxLength(96);
2020-08-22 14:52:23 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Sha512")
.HasColumnType("TEXT")
.HasMaxLength(128);
2020-08-22 14:52:23 +01:00
2020-09-06 19:09:35 +01:00
b.Property<ulong>("Size")
.HasColumnType("INTEGER");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("UpdatedOn")
.HasColumnType("TEXT");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.HasKey("Id");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Crc32");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("IsInRepo");
2020-09-04 22:27:05 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Md5");
2020-09-04 02:17:08 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Sha1");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Sha256");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Sha384");
2020-08-22 14:52:23 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Sha512");
2020-08-22 14:52:23 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Size");
2020-08-21 23:32:44 +01:00
2020-09-06 19:09:35 +01:00
b.ToTable("Files");
});
2020-08-22 05:40:50 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.DbMedia", b =>
2020-09-06 19:09:35 +01:00
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("CreatedOn")
.HasColumnType("TEXT");
2020-09-06 19:09:35 +01:00
b.Property<bool>("IsInRepo")
.HasColumnType("INTEGER");
2020-09-06 19:09:35 +01:00
b.Property<string>("Md5")
.HasColumnType("TEXT")
.HasMaxLength(32);
2020-09-06 19:09:35 +01:00
b.Property<string>("OriginalFileName")
.HasColumnType("TEXT");
2020-09-06 19:09:35 +01:00
b.Property<string>("Sha1")
.HasColumnType("TEXT")
.HasMaxLength(40);
2020-09-06 19:09:35 +01:00
b.Property<string>("Sha256")
.HasColumnType("TEXT")
.HasMaxLength(64);
2020-09-06 19:09:35 +01:00
b.Property<ulong?>("Size")
.HasColumnType("INTEGER");
2020-09-06 19:09:35 +01:00
b.Property<string>("SpamSum")
.HasColumnType("TEXT");
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("UpdatedOn")
.HasColumnType("TEXT");
2020-09-06 19:09:35 +01:00
b.HasKey("Id");
2020-09-06 19:09:35 +01:00
b.HasIndex("IsInRepo");
2020-09-06 19:09:35 +01:00
b.HasIndex("Md5");
2020-09-06 19:09:35 +01:00
b.HasIndex("Sha1");
2020-09-06 19:09:35 +01:00
b.HasIndex("Sha256");
2020-09-06 19:09:35 +01:00
b.HasIndex("Size");
2020-09-06 19:09:35 +01:00
b.HasIndex("SpamSum");
2020-09-06 19:09:35 +01:00
b.ToTable("Medias");
});
2020-09-04 02:12:38 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.DiskByMachine", b =>
2020-09-06 19:09:35 +01:00
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<ulong>("DiskId")
.HasColumnType("INTEGER");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<ulong>("MachineId")
.HasColumnType("INTEGER");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.HasKey("Id");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("DiskId");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("MachineId");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Name");
2020-09-04 02:12:38 +01:00
2020-09-06 19:09:35 +01:00
b.ToTable("DisksByMachines");
});
2020-09-04 02:12:38 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.FileByMachine", b =>
2020-09-06 19:09:35 +01:00
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<ulong>("FileId")
.HasColumnType("INTEGER");
2020-09-06 19:09:35 +01:00
b.Property<DateTime?>("FileLastModification")
.HasColumnType("TEXT");
2020-09-06 19:09:35 +01:00
b.Property<ulong>("MachineId")
.HasColumnType("INTEGER");
2020-09-06 19:09:35 +01:00
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
2020-09-06 19:09:35 +01:00
b.HasKey("Id");
2020-09-06 19:09:35 +01:00
b.HasIndex("FileId");
2020-09-06 19:09:35 +01:00
b.HasIndex("MachineId");
2020-09-06 19:09:35 +01:00
b.HasIndex("Name");
2020-09-06 19:09:35 +01:00
b.ToTable("FilesByMachines");
});
2020-08-22 14:20:59 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.Machine", b =>
2020-09-06 19:09:35 +01:00
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2020-08-22 14:20:59 +01:00
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("CreatedOn")
.HasColumnType("TEXT");
2020-08-22 14:20:59 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
2020-08-22 14:20:59 +01:00
2020-09-06 19:09:35 +01:00
b.Property<long>("RomSetId")
.HasColumnType("INTEGER");
2020-08-22 14:20:59 +01:00
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("UpdatedOn")
.HasColumnType("TEXT");
2020-08-22 14:20:59 +01:00
2020-09-06 19:09:35 +01:00
b.HasKey("Id");
2020-08-22 14:20:59 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Name");
2020-08-22 14:20:59 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("RomSetId");
2020-08-22 14:20:59 +01:00
2020-09-06 19:09:35 +01:00
b.ToTable("Machines");
});
2020-08-22 14:20:59 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.MediaByMachine", b =>
2020-09-06 19:09:35 +01:00
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2020-09-06 19:09:35 +01:00
b.Property<ulong>("MachineId")
.HasColumnType("INTEGER");
2020-09-06 19:09:35 +01:00
b.Property<ulong>("MediaId")
.HasColumnType("INTEGER");
2020-09-06 19:09:35 +01:00
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
2020-09-06 19:09:35 +01:00
b.HasKey("Id");
2020-09-06 19:09:35 +01:00
b.HasIndex("MachineId");
2020-09-06 19:09:35 +01:00
b.HasIndex("MediaId");
2020-09-06 19:09:35 +01:00
b.HasIndex("Name");
2020-09-06 19:09:35 +01:00
b.ToTable("MediasByMachines");
});
2020-08-22 05:40:50 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.RomSet", b =>
2020-09-06 19:09:35 +01:00
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Author")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Category")
.HasColumnType("TEXT");
2020-09-05 01:52:43 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Comment")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("CreatedOn")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Date")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Description")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Filename")
.IsRequired()
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Homepage")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Name")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Sha384")
.IsRequired()
.HasColumnType("TEXT")
.HasMaxLength(96);
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<DateTime>("UpdatedOn")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.Property<string>("Version")
.HasColumnType("TEXT");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasKey("Id");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Author");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Category");
2020-09-05 01:52:43 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Comment");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Date");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Description");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Filename");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Homepage");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Name");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Sha384");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.HasIndex("Version");
2020-08-22 05:40:50 +01:00
2020-09-06 19:09:35 +01:00
b.ToTable("RomSets");
});
2020-08-22 14:20:59 +01:00
2020-09-04 02:12:38 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.DiskByMachine", b =>
2020-09-06 19:09:35 +01:00
{
b.HasOne("RomRepoMgr.Database.Models.DbDisk", "Disk")
.WithMany("Machines")
.HasForeignKey("DiskId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RomRepoMgr.Database.Models.Machine", "Machine")
.WithMany("Disks")
.HasForeignKey("MachineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
2020-09-04 02:12:38 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.FileByMachine", b =>
2020-09-06 19:09:35 +01:00
{
b.HasOne("RomRepoMgr.Database.Models.DbFile", "File")
.WithMany("Machines")
.HasForeignKey("FileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RomRepoMgr.Database.Models.Machine", "Machine")
.WithMany("Files")
.HasForeignKey("MachineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
2020-08-22 14:20:59 +01:00
modelBuilder.Entity("RomRepoMgr.Database.Models.Machine", b =>
2020-09-06 19:09:35 +01:00
{
b.HasOne("RomRepoMgr.Database.Models.RomSet", "RomSet")
.WithMany("Machines")
.HasForeignKey("RomSetId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RomRepoMgr.Database.Models.MediaByMachine", b =>
2020-09-06 19:09:35 +01:00
{
b.HasOne("RomRepoMgr.Database.Models.Machine", "Machine")
.WithMany("Medias")
.HasForeignKey("MachineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RomRepoMgr.Database.Models.DbMedia", "Media")
.WithMany("Machines")
.HasForeignKey("MediaId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
2020-08-21 23:21:01 +01:00
}
}
2020-09-06 19:09:35 +01:00
}