//
using System;
using Marechai.Database.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Marechai.Database.Migrations
{
[DbContext(typeof(MarechaiContext))]
[Migration("20260625191947_AddIgdbMirrorAndMappingTables")]
partial class AddIgdbMirrorAndMappingTables
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.11")
.HasAnnotation("Proxies:ChangeTracking", false)
.HasAnnotation("Proxies:CheckEquality", false)
.HasAnnotation("Proxies:LazyLoading", true)
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("Marechai.Database.Models.ApplicationRole", b =>
{
b.Property("Id")
.HasColumnType("varchar(255)");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("longtext");
b.Property("Created")
.HasColumnType("datetime(6)");
b.Property("Description")
.HasColumnType("longtext");
b.Property("Name")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("NormalizedName")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex");
b.ToTable("AspNetRoles", (string)null);
});
modelBuilder.Entity("Marechai.Database.Models.ApplicationUser", b =>
{
b.Property("Id")
.HasColumnType("varchar(255)");
b.Property("AccessFailedCount")
.HasColumnType("int");
b.Property("AvatarGuid")
.HasColumnType("char(36)");
b.Property("Bio")
.HasMaxLength(2000)
.HasColumnType("varchar(2000)");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("longtext");
b.Property("DeletionRequestedAt")
.HasColumnType("datetime(6)");
b.Property("DisplayName")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property("Email")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("EmailConfirmed")
.HasColumnType("bit(1)");
b.Property("Facebook")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("GitHub")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property("IsSystemAccount")
.HasColumnType("bit(1)");
b.Property("LastLanguageVisited")
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property("LinkedIn")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("Location")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("LockoutEnabled")
.HasColumnType("bit(1)");
b.Property("LockoutEnd")
.HasColumnType("datetime(6)");
b.Property("Mastodon")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("NotifyOnNewMessage")
.HasColumnType("bit(1)");
b.Property("OriginalAvatarExtension")
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property("PasswordHash")
.HasColumnType("longtext");
b.Property("PhoneNumber")
.HasColumnType("longtext");
b.Property("PhoneNumberConfirmed")
.HasColumnType("bit(1)");
b.Property("PreferredThemeId")
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property("SecurityStamp")
.HasColumnType("longtext");
b.Property("Twitter")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property("TwoFactorEnabled")
.HasColumnType("bit(1)");
b.Property("TwoFactorViaAuthenticator")
.HasColumnType("bit(1)");
b.Property("TwoFactorViaEmail")
.HasColumnType("bit(1)");
b.Property("UseGravatar")
.HasColumnType("bit(1)");
b.Property("UserName")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("Website")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Marechai.Database.Models.Audit", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("AffectedColumns")
.HasColumnType("json");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("Keys")
.HasColumnType("json");
b.Property("NewValues")
.HasColumnType("json");
b.Property("OldValues")
.HasColumnType("json");
b.Property("Table")
.HasColumnType("varchar(255)");
b.Property("Type")
.HasColumnType("tinyint unsigned");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.Property("UserId")
.IsRequired()
.HasColumnType("varchar(255)");
b.HasKey("Id");
b.HasIndex("Table");
b.HasIndex("Type");
b.HasIndex("UserId");
b.ToTable("Audit");
});
modelBuilder.Entity("Marechai.Database.Models.Book", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CountryId")
.HasColumnType("smallint(3)");
b.Property("CoverGuid")
.HasColumnType("char(36)");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("Edition")
.HasColumnType("int");
b.Property("InternetArchiveUrl")
.HasMaxLength(2048)
.HasColumnType("varchar(2048)");
b.Property("Isbn")
.HasMaxLength(13)
.HasColumnType("varchar(13)");
b.Property("NativeTitle")
.HasColumnType("varchar(255)");
b.Property("OriginalCoverExtension")
.HasColumnType("longtext");
b.Property("Pages")
.HasColumnType("smallint");
b.Property("PreviousId")
.HasColumnType("bigint");
b.Property("Published")
.HasColumnType("datetime(6)");
b.Property("PublishedPrecision")
.HasColumnType("tinyint unsigned");
b.Property("SortTitle")
.HasColumnType("longtext");
b.Property("SourceId")
.HasColumnType("bigint");
b.Property("Title")
.IsRequired()
.HasColumnType("varchar(255)");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("CountryId");
b.HasIndex("Edition");
b.HasIndex("Isbn");
b.HasIndex("NativeTitle");
b.HasIndex("Pages");
b.HasIndex("PreviousId")
.IsUnique();
b.HasIndex("Published");
b.HasIndex("SourceId");
b.HasIndex("Title");
b.ToTable("Books");
});
modelBuilder.Entity("Marechai.Database.Models.BookSynopsis", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BookId")
.HasColumnType("bigint");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("LanguageCode")
.IsRequired()
.HasMaxLength(3)
.HasColumnType("char(3)");
b.Property("Text")
.IsRequired()
.HasMaxLength(262144)
.HasColumnType("longtext");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("LanguageCode");
b.HasIndex("Text")
.HasAnnotation("MySql:FullTextIndex", true);
b.HasIndex("BookId", "LanguageCode")
.IsUnique()
.HasDatabaseName("idx_book_synopses_book_language");
b.ToTable("BookSynopses");
});
modelBuilder.Entity("Marechai.Database.Models.BooksByMachine", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BookId")
.HasColumnType("bigint");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("MachineId")
.HasColumnType("int(11)");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("BookId");
b.HasIndex("MachineId");
b.ToTable("BooksByMachines");
});
modelBuilder.Entity("Marechai.Database.Models.BooksByMachineFamily", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BookId")
.HasColumnType("bigint");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("MachineFamilyId")
.HasColumnType("int(11)");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("BookId");
b.HasIndex("MachineFamilyId");
b.ToTable("BooksByMachineFamilies");
});
modelBuilder.Entity("Marechai.Database.Models.BrowserTest", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int(11)")
.HasColumnName("id");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Agif")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("agif");
b.Property("Browser")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("browser")
.HasDefaultValueSql("''");
b.Property("Colors")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("colors");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("Flash")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("flash");
b.Property("Frames")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("frames");
b.Property("Gif87")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("gif87");
b.Property("Gif89")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("gif89");
b.Property("Jpeg")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("jpeg");
b.Property("Js")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("js");
b.Property("Os")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(32)
.HasColumnType("varchar(32)")
.HasColumnName("os")
.HasDefaultValueSql("''");
b.Property("Platform")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(8)
.HasColumnType("varchar(8)")
.HasColumnName("platform")
.HasDefaultValueSql("''");
b.Property("Png")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("png");
b.Property("Pngt")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("pngt");
b.Property("Table")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue((sbyte)0)
.HasColumnName("table");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.Property("UserAgent")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("user_agent")
.HasDefaultValueSql("''");
b.Property("Version")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(16)
.HasColumnType("varchar(16)")
.HasColumnName("version")
.HasDefaultValueSql("''");
b.HasKey("Id");
b.HasIndex("Browser")
.HasDatabaseName("idx_browser_tests_browser");
b.HasIndex("Os")
.HasDatabaseName("idx_browser_tests_os");
b.HasIndex("Platform")
.HasDatabaseName("idx_browser_tests_platform");
b.HasIndex("UserAgent")
.HasDatabaseName("idx_browser_tests_user_agent");
b.HasIndex("Version")
.HasDatabaseName("idx_browser_tests_version");
b.ToTable("browser_tests", (string)null);
});
modelBuilder.Entity("Marechai.Database.Models.CollectedBook", b =>
{
b.Property("UserId")
.HasColumnType("varchar(255)");
b.Property("BookId")
.HasColumnType("bigint");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.HasKey("UserId", "BookId");
b.HasIndex("BookId");
b.ToTable("CollectedBooks");
});
modelBuilder.Entity("Marechai.Database.Models.CollectedDocument", b =>
{
b.Property("UserId")
.HasColumnType("varchar(255)");
b.Property("DocumentId")
.HasColumnType("bigint");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.HasKey("UserId", "DocumentId");
b.HasIndex("DocumentId");
b.ToTable("CollectedDocuments");
});
modelBuilder.Entity("Marechai.Database.Models.CollectedMagazineIssue", b =>
{
b.Property("UserId")
.HasColumnType("varchar(255)");
b.Property("MagazineIssueId")
.HasColumnType("bigint");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.HasKey("UserId", "MagazineIssueId");
b.HasIndex("MagazineIssueId");
b.ToTable("CollectedMagazineIssues");
});
modelBuilder.Entity("Marechai.Database.Models.CollectedSoftwareRelease", b =>
{
b.Property("UserId")
.HasColumnType("varchar(255)");
b.Property("SoftwareReleaseId")
.HasColumnType("bigint unsigned");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.HasKey("UserId", "SoftwareReleaseId");
b.HasIndex("SoftwareReleaseId");
b.ToTable("CollectedSoftwareReleases");
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesByBook", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BookId")
.HasColumnType("bigint");
b.Property("CompanyId")
.HasColumnType("int(11)");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("RoleId")
.IsRequired()
.HasColumnType("char(3)");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("BookId");
b.HasIndex("CompanyId");
b.HasIndex("RoleId");
b.ToTable("CompaniesByBooks");
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesByDocument", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CompanyId")
.HasColumnType("int(11)");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("DocumentId")
.HasColumnType("bigint");
b.Property("RoleId")
.IsRequired()
.HasColumnType("char(3)");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("DocumentId");
b.HasIndex("RoleId");
b.ToTable("CompaniesByDocuments");
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesByMagazine", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CompanyId")
.HasColumnType("int(11)");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("MagazineId")
.HasColumnType("bigint");
b.Property("RoleId")
.IsRequired()
.HasColumnType("char(3)");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("MagazineId");
b.HasIndex("RoleId");
b.ToTable("CompaniesByMagazines");
});
modelBuilder.Entity("Marechai.Database.Models.Company", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int(11)")
.HasColumnName("id");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Address")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasColumnName("address");
b.Property("City")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasColumnName("city");
b.Property("CountryId")
.HasColumnType("smallint(3)")
.HasColumnName("country");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("Facebook")
.HasMaxLength(45)
.HasColumnType("varchar(45)")
.HasColumnName("facebook");
b.Property("Founded")
.HasColumnType("datetime")
.HasColumnName("founded");
b.Property("FoundedPrecision")
.HasColumnType("tinyint unsigned");
b.Property("LegalName")
.HasColumnType("longtext");
b.Property("Name")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("varchar(128)")
.HasColumnName("name")
.HasDefaultValueSql("''");
b.Property("PostalCode")
.HasMaxLength(25)
.HasColumnType("varchar(25)")
.HasColumnName("postal_code");
b.Property("Province")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasColumnName("province");
b.Property("Sold")
.HasColumnType("datetime")
.HasColumnName("sold");
b.Property("SoldPrecision")
.HasColumnType("tinyint unsigned");
b.Property("SoldToId")
.HasColumnType("int(11)")
.HasColumnName("sold_to");
b.Property("Status")
.HasColumnType("int(11)")
.HasColumnName("status");
b.Property("Twitter")
.HasMaxLength(45)
.HasColumnType("varchar(45)")
.HasColumnName("twitter");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.Property("Website")
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasColumnName("website");
b.HasKey("Id");
b.HasIndex("Address")
.HasDatabaseName("idx_companies_address");
b.HasIndex("City")
.HasDatabaseName("idx_companies_city");
b.HasIndex("CountryId")
.HasDatabaseName("idx_companies_country");
b.HasIndex("Facebook")
.HasDatabaseName("idx_companies_facebook");
b.HasIndex("Founded")
.HasDatabaseName("idx_companies_founded");
b.HasIndex("Name")
.HasDatabaseName("idx_companies_name");
b.HasIndex("PostalCode")
.HasDatabaseName("idx_companies_postal_code");
b.HasIndex("Province")
.HasDatabaseName("idx_companies_province");
b.HasIndex("Sold")
.HasDatabaseName("idx_companies_sold");
b.HasIndex("SoldToId")
.HasDatabaseName("idx_companies_sold_to");
b.HasIndex("Status")
.HasDatabaseName("idx_companies_status");
b.HasIndex("Twitter")
.HasDatabaseName("idx_companies_twitter");
b.HasIndex("Website")
.HasDatabaseName("idx_companies_website");
b.ToTable("companies", (string)null);
});
modelBuilder.Entity("Marechai.Database.Models.CompanyBySoftwareFamily", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CompanyId")
.HasColumnType("int(11)");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("RoleId")
.IsRequired()
.HasColumnType("char(3)");
b.Property("SoftwareFamilyId")
.HasColumnType("bigint unsigned");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("RoleId");
b.HasIndex("SoftwareFamilyId");
b.ToTable("CompaniesBySoftwareFamilies");
});
modelBuilder.Entity("Marechai.Database.Models.CompanyBySoftwareVersion", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CompanyId")
.HasColumnType("int(11)");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("RoleId")
.IsRequired()
.HasColumnType("char(3)");
b.Property("SoftwareVersionId")
.HasColumnType("bigint unsigned");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("RoleId");
b.HasIndex("SoftwareVersionId");
b.ToTable("CompaniesBySoftwareVersions");
});
modelBuilder.Entity("Marechai.Database.Models.CompanyDescription", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CompanyId")
.HasColumnType("int(11)");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("Html")
.HasMaxLength(262144)
.HasColumnType("longtext");
b.Property("LanguageCode")
.IsRequired()
.HasMaxLength(3)
.HasColumnType("char(3)");
b.Property("Text")
.IsRequired()
.HasMaxLength(262144)
.HasColumnType("longtext");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("LanguageCode");
b.HasIndex("Text")
.HasAnnotation("MySql:FullTextIndex", true);
b.HasIndex("CompanyId", "LanguageCode")
.IsUnique()
.HasDatabaseName("idx_company_descriptions_company_language");
b.ToTable("CompanyDescriptions");
});
modelBuilder.Entity("Marechai.Database.Models.CompanyLogo", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int(11)")
.HasColumnName("id");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CompanyId")
.HasColumnType("int(11)")
.HasColumnName("company_id");
b.Property("Guid")
.HasColumnType("char(36)")
.HasColumnName("logo_guid");
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.Property("Year")
.HasColumnType("int(4)")
.HasColumnName("year");
b.HasKey("Id", "CompanyId", "Guid");
b.HasIndex("CompanyId")
.HasDatabaseName("idx_company_id");
b.HasIndex("Guid")
.HasDatabaseName("idx_guid");
b.HasIndex("Id")
.IsUnique()
.HasDatabaseName("idx_id");
b.ToTable("company_logos", (string)null);
});
modelBuilder.Entity("Marechai.Database.Models.Conversation", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("IsSystemThread")
.HasColumnType("bit(1)");
b.Property("Subject")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("IsSystemThread");
b.ToTable("Conversations");
});
modelBuilder.Entity("Marechai.Database.Models.ConversationParticipant", b =>
{
b.Property("ConversationId")
.HasColumnType("bigint");
b.Property("UserId")
.HasColumnType("varchar(255)");
b.Property("JoinedOn")
.HasColumnType("datetime(6)");
b.Property("LeftOn")
.HasColumnType("datetime(6)");
b.HasKey("ConversationId", "UserId");
b.HasIndex("UserId");
b.ToTable("ConversationParticipants");
});
modelBuilder.Entity("Marechai.Database.Models.CurrencyInflation", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("CurrencyCode")
.IsRequired()
.HasColumnType("varchar(3)");
b.Property("Inflation")
.HasColumnType("float");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.Property("Year")
.HasColumnType("int unsigned");
b.HasKey("Id");
b.HasIndex("CurrencyCode");
b.HasIndex("Year");
b.ToTable("CurrenciesInflation");
});
modelBuilder.Entity("Marechai.Database.Models.CurrencyPegging", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CreatedOn"));
b.Property("DestinationCode")
.IsRequired()
.HasColumnType("varchar(3)");
b.Property("End")
.HasColumnType("datetime(6)");
b.Property("Ratio")
.HasColumnType("float");
b.Property("SourceCode")
.IsRequired()
.HasColumnType("varchar(3)");
b.Property("Start")
.HasColumnType("datetime(6)");
b.Property("UpdatedOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)");
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedOn"));
b.HasKey("Id");
b.HasIndex("DestinationCode");
b.HasIndex("End");
b.HasIndex("SourceCode");
b.HasIndex("Start");
b.ToTable("CurrenciesPegging");
});
modelBuilder.Entity("Marechai.Database.Models.DbFile", b =>
{
b.Property