pgLabII/pgLabII/Migrations/LocalDbModelSnapshot.cs
eelke 4ff9b78db8 Fix local db
- correct path to contain application specific folder
- create migration
- apply the migrations at startup
- reactivate commented out code

The code was failing before because the tables were never created.
2025-10-26 06:27:43 +01:00

136 lines
4.3 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using pgLabII.Infra;
#nullable disable
namespace pgLabII.Migrations
{
[DbContext(typeof(LocalDb))]
partial class LocalDbModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
modelBuilder.Entity("pgLabII.Model.Document", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("BaseCopyFilename")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("Created")
.HasColumnType("TEXT");
b.Property<DateTime>("LastModified")
.HasColumnType("TEXT");
b.Property<string>("OriginalFilename")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Documents");
});
modelBuilder.Entity("pgLabII.Model.EditHistoryEntry", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("DocumentId")
.HasColumnType("INTEGER");
b.Property<string>("InsertedText")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("Offset")
.HasColumnType("INTEGER");
b.Property<string>("RemovedText")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("Timestamp")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("DocumentId", "Timestamp");
b.ToTable("EditHistory");
});
modelBuilder.Entity("pgLabII.Model.ServerConfigurationEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<int>("ColorArgb")
.HasColumnType("INTEGER");
b.Property<bool>("ColorEnabled")
.HasColumnType("INTEGER");
b.Property<string>("Host")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("InitialDatabase")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("TEXT");
b.Property<ushort>("Port")
.HasColumnType("INTEGER");
b.Property<int>("SslMode")
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("ServerConfigurations");
});
modelBuilder.Entity("pgLabII.Model.EditHistoryEntry", b =>
{
b.HasOne("pgLabII.Model.Document", "Document")
.WithMany("EditHistory")
.HasForeignKey("DocumentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Document");
});
modelBuilder.Entity("pgLabII.Model.Document", b =>
{
b.Navigation("EditHistory");
});
#pragma warning restore 612, 618
}
}
}