diff --git a/Common/VersionHelpers.cs b/Common/VersionHelpers.cs
index f6d3bb40..bbaa12a4 100644
--- a/Common/VersionHelpers.cs
+++ b/Common/VersionHelpers.cs
@@ -3,7 +3,6 @@
using System.Diagnostics;
using System.Net.Http.Headers;
using System.Net.Http.Json;
-using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
diff --git a/DatabaseTools/Services/CallbackTextWriter.cs b/DatabaseTools/Services/CallbackTextWriter.cs
index 6a56c930..3e7a577a 100644
--- a/DatabaseTools/Services/CallbackTextWriter.cs
+++ b/DatabaseTools/Services/CallbackTextWriter.cs
@@ -62,7 +62,7 @@ public override void Flush()
}
var line = _buffer.ToString();
- _buffer.Clear();
+ _ = _buffer.Clear();
_onLine(line);
}
}
diff --git a/Definitions/Database/Base/DbCoreObject.cs b/Definitions/Database/Base/DbCoreObject.cs
index e48d6348..ce9864d4 100644
--- a/Definitions/Database/Base/DbCoreObject.cs
+++ b/Definitions/Database/Base/DbCoreObject.cs
@@ -39,4 +39,20 @@ public abstract class DbCoreObject : DbIdObject, IDbName, IDbDescription, IDbMet
public DateOnly UploadedDate { get; set; }
#endregion
+
+ #region Ownership
+
+ ///
+ /// The user who owns (uploaded) this object.
+ /// for objects not owned by any user (e.g. imported/vanilla).
+ ///
+ public UniqueObjectId? OwnerUserId { get; set; }
+
+ ///
+ /// Navigation property to the owning user.
+ ///
+ [ForeignKey(nameof(OwnerUserId))]
+ public TblUser? OwnerUser { get; set; }
+
+ #endregion
}
diff --git a/Definitions/Migrations/20260902133456_UnknownBulkUpgrades.Designer.cs b/Definitions/Migrations/20260902133456_UnknownBulkUpgrades.Designer.cs
new file mode 100644
index 00000000..df4640f2
--- /dev/null
+++ b/Definitions/Migrations/20260902133456_UnknownBulkUpgrades.Designer.cs
@@ -0,0 +1,2722 @@
+//
+using System;
+using Definitions.Database;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace Definitions.Database.Migrations
+{
+ [DbContext(typeof(LocoDbContext))]
+ [Migration("20260902133456_UnknownBulkUpgrades")]
+ partial class UnknownBulkUpgrades
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.11");
+
+ modelBuilder.Entity("Definitions.Database.TblAuthor", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("Authors");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblDatObject", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("DatChecksum")
+ .HasColumnType("INTEGER");
+
+ b.Property("DatName")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ObjectId")
+ .HasColumnType("INTEGER");
+
+ b.Property("xxHash3")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ObjectId");
+
+ b.HasIndex("xxHash3")
+ .IsUnique();
+
+ b.HasIndex("DatName", "DatChecksum")
+ .IsUnique()
+ .IsDescending(true, false);
+
+ b.ToTable("DatObjects");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblLicence", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Text")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("Licences");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObject", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Availability")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedDate")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .HasColumnType("TEXT");
+
+ b.Property("LicenceId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ObjectSource")
+ .HasColumnType("INTEGER");
+
+ b.Property("ObjectType")
+ .HasColumnType("INTEGER");
+
+ b.Property("OwnerUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SubObjectId")
+ .HasColumnType("INTEGER");
+
+ b.Property("UploadedDate")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TEXT")
+ .HasDefaultValueSql("date('now')");
+
+ b.Property("VehicleType")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LicenceId");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.HasIndex("OwnerUserId");
+
+ b.ToTable("Objects");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectAirport", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("DesignedYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("LargeTiles")
+ .HasColumnType("INTEGER");
+
+ b.Property("MaxX")
+ .HasColumnType("INTEGER");
+
+ b.Property("MaxY")
+ .HasColumnType("INTEGER");
+
+ b.Property("MinX")
+ .HasColumnType("INTEGER");
+
+ b.Property("MinY")
+ .HasColumnType("INTEGER");
+
+ b.Property("ObsoleteYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjAirport");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectBridge", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BaseCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("ClearHeight")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("DeckDepth")
+ .HasColumnType("INTEGER");
+
+ b.Property("DesignedYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("DisabledTrackFlags")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("HeightCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("MaxHeight")
+ .HasColumnType("INTEGER");
+
+ b.Property("MaxSpeed")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("PillarSpacing")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("SpanLength")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjBridge");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectBuilding", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AverageNumberOnMap")
+ .HasColumnType("INTEGER");
+
+ b.Property("Colours")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("DemolishRatingReduction")
+ .HasColumnType("INTEGER");
+
+ b.Property("DesignedYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("GeneratorFunction")
+ .HasColumnType("INTEGER");
+
+ b.Property("ObsoleteYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ScaffoldingColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("ScaffoldingSegmentType")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjBuilding");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectCargo", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CargoCategory")
+ .HasColumnType("INTEGER");
+
+ b.Property("CargoTransferTime")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("MaxNonPremiumDays")
+ .HasColumnType("INTEGER");
+
+ b.Property("NonPremiumRate")
+ .HasColumnType("INTEGER");
+
+ b.Property("NumPlatformVariations")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("PaymentFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("PaymentIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("PenaltyRate")
+ .HasColumnType("INTEGER");
+
+ b.Property("PremiumDays")
+ .HasColumnType("INTEGER");
+
+ b.Property("StationCargoDensity")
+ .HasColumnType("INTEGER");
+
+ b.Property("UnitSize")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjCargo");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectCliffEdge", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjCliffEdge");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectClimate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("FirstSeason")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SeasonLength1")
+ .HasColumnType("INTEGER");
+
+ b.Property("SeasonLength2")
+ .HasColumnType("INTEGER");
+
+ b.Property("SeasonLength3")
+ .HasColumnType("INTEGER");
+
+ b.Property("SeasonLength4")
+ .HasColumnType("INTEGER");
+
+ b.Property("SummerSnowLine")
+ .HasColumnType("INTEGER");
+
+ b.Property("WinterSnowLine")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjClimate");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectCompetitor", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Aggressiveness")
+ .HasColumnType("INTEGER");
+
+ b.Property("AvailableNamePrefixes")
+ .HasColumnType("INTEGER");
+
+ b.Property("AvailableNameSuffixes")
+ .HasColumnType("INTEGER");
+
+ b.Property("Competitiveness")
+ .HasColumnType("INTEGER");
+
+ b.Property("Emotions")
+ .HasColumnType("INTEGER");
+
+ b.Property("Intelligence")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjCompetitor");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectCurrency", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Factor")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Separator")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjCurrency");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectDock", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BoatPositionX")
+ .HasColumnType("INTEGER");
+
+ b.Property("BoatPositionY")
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("DesignedYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("NumBuildingPartAnimations")
+ .HasColumnType("INTEGER");
+
+ b.Property("NumBuildingVariationParts")
+ .HasColumnType("INTEGER");
+
+ b.Property("ObsoleteYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjDock");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectHillShapes", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("HillHeightMapCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsHeightMap")
+ .HasColumnType("INTEGER");
+
+ b.Property("MountainHeightMapCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjHillShapes");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectIndustry", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildingSizeFlags")
+ .HasColumnType("INTEGER");
+
+ b.Property("Colours")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("DesignedYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("FarmGrowthStageWithNoProduction")
+ .HasColumnType("INTEGER");
+
+ b.Property("FarmIdealSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("FarmImagesPerGrowthStage")
+ .HasColumnType("INTEGER");
+
+ b.Property("FarmNumStagesOfGrowth")
+ .HasColumnType("INTEGER");
+
+ b.Property("FarmTileNumImageAngles")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("MapColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("MaxNumBuildings")
+ .HasColumnType("INTEGER");
+
+ b.Property("MinNumBuildings")
+ .HasColumnType("INTEGER");
+
+ b.Property("MonthlyClosureChance")
+ .HasColumnType("INTEGER");
+
+ b.Property("ObsoleteYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ScaffoldingColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("ScaffoldingSegmentType")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("TotalOfTypeInScenario")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjIndustry");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectInterface", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Colour_11")
+ .HasColumnType("INTEGER");
+
+ b.Property("CompanyInfoToolbarColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("ErrorColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("MapTooltipCargoColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("MapTooltipObjectColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("TimeToolbarColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("TooltipColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("TopToolbarPrimaryColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("TopToolbarQuaternaryColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("TopToolbarSecondaryColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("TopToolbarTertiaryColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("WindowColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("WindowConstructionColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("WindowMapColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("WindowOptionsColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("WindowPlayerColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("WindowTerraFormColour")
+ .HasColumnType("INTEGER");
+
+ b.Property("WindowTitlebarColour")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjInterface");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectLand", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("DistributionPattern")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("NumGrowthStages")
+ .HasColumnType("INTEGER");
+
+ b.Property("NumImageAngles")
+ .HasColumnType("INTEGER");
+
+ b.Property("NumImagesPerGrowthStage")
+ .HasColumnType("INTEGER");
+
+ b.Property("NumVariations")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("VariationLikelihood")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjLand");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectLevelCrossing", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ClosedAnimationFrameCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("ClosedAnimationFrameInterval")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("DesignedYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("TransitionAnimationDelayBitmask")
+ .HasColumnType("INTEGER");
+
+ b.Property("TransitionAnimationFrameCount")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjLevelCrossing");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectMissing", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("DatChecksum")
+ .HasColumnType("INTEGER");
+
+ b.Property("DatName")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ObjectType")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DatName", "DatChecksum")
+ .IsUnique();
+
+ b.ToTable("ObjectsMissing");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectPack", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedDate")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .HasColumnType("TEXT");
+
+ b.Property("LicenceId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("OwnerUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property("UploadedDate")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TEXT")
+ .HasDefaultValueSql("date('now')");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LicenceId");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.HasIndex("OwnerUserId");
+
+ b.ToTable("ObjectPacks");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectRegion", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjRegion");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectRoad", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("MaxSpeed")
+ .HasColumnType("INTEGER");
+
+ b.Property("PaintStyle")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("RoadPieces")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("TargetTownSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("TunnelCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("VehicleDisplayListVerticalOffset")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjRoad");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectRoadExtra", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("PaintStyle")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("RoadPieces")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjRoadExtra");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectRoadStation", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("CompatibleRoadObjectCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("DesignedYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("Height")
+ .HasColumnType("INTEGER");
+
+ b.Property("ObsoleteYear")
+ .HasColumnType("INTEGER");
+
+ b.Property("PaintStyle")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("RoadPieces")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjRoadStation");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectScaffolding", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjScaffolding");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectScenarioText", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjScenarioText");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectSnow", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjSnow");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectSound", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ShouldLoop")
+ .HasColumnType("INTEGER");
+
+ b.Property("Volume")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjSound");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectSteam", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("NumStationaryTicks")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SpriteHeightNegative")
+ .HasColumnType("INTEGER");
+
+ b.Property("SpriteHeightPositive")
+ .HasColumnType("INTEGER");
+
+ b.Property("SpriteWidth")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjSteam");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectStreetLight", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjStreetLight");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectTownNames", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("ObjTownNames");
+ });
+
+ modelBuilder.Entity("Definitions.Database.TblObjectTrack", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property("CostIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("CurveSpeed")
+ .HasColumnType("INTEGER");
+
+ b.Property("Flags")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SellCostFactor")
+ .HasColumnType("INTEGER");
+
+ b.Property