diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-08-17 13:54:01 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2023-08-17 13:54:01 +1000 |
| commit | a57b6ea2e174cedb04a422a05a180f377ed4c448 (patch) | |
| tree | cd454fa16c7d37a484268c722b9b57527dad2b4b /Migrations/HBContextModelSnapshot.cs | |
| parent | 727dcaacc6df8813a9296ac858dd51d11f3737b8 (diff) | |
Fixed implicit tagging completely and switched DB to PostgreSQL
Diffstat (limited to 'Migrations/HBContextModelSnapshot.cs')
| -rw-r--r-- | Migrations/HBContextModelSnapshot.cs | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/Migrations/HBContextModelSnapshot.cs b/Migrations/HBContextModelSnapshot.cs index 06712a6..aac8471 100644 --- a/Migrations/HBContextModelSnapshot.cs +++ b/Migrations/HBContextModelSnapshot.cs @@ -4,6 +4,7 @@ using HyperBooru; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable @@ -19,16 +20,21 @@ namespace HyperBooru.Migrations .HasAnnotation("ProductVersion", "7.0.10") .HasAnnotation("Proxies:ChangeTracking", false) .HasAnnotation("Proxies:CheckEquality", false) - .HasAnnotation("Proxies:LazyLoading", true); + .HasAnnotation("Proxies:LazyLoading", true) + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("HyperBooru.HBObject", b => { b.Property<int>("ObjectId") .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("ObjectId")); b.Property<Guid>("Guid") - .HasColumnType("TEXT"); + .HasColumnType("uuid"); b.HasKey("ObjectId"); @@ -43,29 +49,31 @@ namespace HyperBooru.Migrations { b.Property<int>("UploadedFileId") .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UploadedFileId")); b.Property<DateTime?>("CreateTime") - .HasColumnType("TEXT"); + .HasColumnType("timestamp with time zone"); b.Property<string>("Filename") - .HasColumnType("TEXT"); + .HasColumnType("text"); b.Property<DateTime?>("LastAccessTime") - .HasColumnType("TEXT"); + .HasColumnType("timestamp with time zone"); b.Property<DateTime?>("LastWriteTime") - .HasColumnType("TEXT"); + .HasColumnType("timestamp with time zone"); b.Property<int>("MediaObjectId") - .HasColumnType("INTEGER"); + .HasColumnType("integer"); b.Property<string>("OriginalChecksum") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("text"); b.Property<DateTime>("UploadTime") - .HasColumnType("TEXT"); + .HasColumnType("timestamp with time zone"); b.HasKey("UploadedFileId"); @@ -77,10 +85,10 @@ namespace HyperBooru.Migrations modelBuilder.Entity("TagDefinitionTagDefinition", b => { b.Property<int>("ImplicitTagsObjectId") - .HasColumnType("INTEGER"); + .HasColumnType("integer"); b.Property<int>("TagDefinitionObjectId") - .HasColumnType("INTEGER"); + .HasColumnType("integer"); b.HasKey("ImplicitTagsObjectId", "TagDefinitionObjectId"); @@ -95,17 +103,17 @@ namespace HyperBooru.Migrations b.Property<string>("Checksum") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("text"); b.Property<string>("LongDescription") - .HasColumnType("TEXT"); + .HasColumnType("text"); b.Property<string>("MimeType") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("text"); b.Property<string>("ShortDescription") - .HasColumnType("TEXT"); + .HasColumnType("text"); b.ToTable("Media", (string)null); }); @@ -115,13 +123,13 @@ namespace HyperBooru.Migrations b.HasBaseType("HyperBooru.HBObject"); b.Property<DateTime>("CreateTime") - .HasColumnType("TEXT"); + .HasColumnType("timestamp with time zone"); b.Property<int>("TagDefinitionObjectId") - .HasColumnType("INTEGER"); + .HasColumnType("integer"); b.Property<int>("TargetObjectId") - .HasColumnType("INTEGER"); + .HasColumnType("integer"); b.HasIndex("TagDefinitionObjectId"); @@ -136,13 +144,13 @@ namespace HyperBooru.Migrations b.Property<string>("Name") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("text"); b.Property<string>("Namespace") - .HasColumnType("TEXT"); + .HasColumnType("text"); b.Property<int>("Source") - .HasColumnType("INTEGER"); + .HasColumnType("integer"); b.ToTable("TagDefinitions", (string)null); @@ -150,14 +158,14 @@ namespace HyperBooru.Migrations new { ObjectId = -1, - Guid = new Guid("13399c38-34b8-44a1-ac42-536bd32de96a"), + Guid = new Guid("e906ff13-ee7d-4eb2-826b-1cf880590f6b"), Name = "nsfw", Source = 0 }, new { ObjectId = -2, - Guid = new Guid("8b9cd13c-422a-4958-b97e-b858ac9301db"), + Guid = new Guid("bab0a0f2-b126-429c-a80e-4f339a1f4bb2"), Name = "ingest", Source = 0 }); |
