chore(db): regenerate AddNewsPosts migration with EF designer file
Manual migration was missing the .Designer.cs file EF Core requires to recognise it. Deleted the stub, ran 'dotnet ef migrations add AddNewsPosts', and applied the generated migration to the database. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
+655
@@ -0,0 +1,655 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using SOR.Database.Contexts;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SOR.Database.Migrations.Catalog
|
||||
{
|
||||
[DbContext(typeof(CatalogDbContext))]
|
||||
[Migration("20260423125847_AddNewsPosts")]
|
||||
partial class AddNewsPosts
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("catalog")
|
||||
.HasAnnotation("ProductVersion", "8.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("ActionName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AnimationCdnUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AnimationTrackName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("CardDefinitionId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("CastSoundCdnUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ImpactSoundCdnUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsAiGenerated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CardDefinitionId", "ActionName")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("card_animation_bindings", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("AssetType")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("CardDefinitionId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("CdnUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContentETag")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("IsAiGenerated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("MimeType")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ModelFacingDirection")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ModelTintMaskUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CardDefinitionId", "AssetType");
|
||||
|
||||
b.ToTable("card_assets", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("AbilitiesJson")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("abilities");
|
||||
|
||||
b.Property<string>("Affinity")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AttackSoundUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("AttackType")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("BlockedSoundUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool?>("CanAttack")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool?>("CanBeAttacked")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool?>("CanBeBlocked")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool?>("CanBeObstructed")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool?>("CanBeSacrificed")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool?>("CanDefend")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool?>("CanMove")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool?>("CanUseAbility")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("CardType")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("CollectorNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("Damage")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("DamagedSoundUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DeathSoundUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long>("DefinitionVersion")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint")
|
||||
.HasDefaultValue(0L);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string[]>("Genus")
|
||||
.HasColumnType("text[]");
|
||||
|
||||
b.Property<bool>("IsPublished")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsRetired")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("MaxAttackRange")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("MaxChannelRange")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("MaxDefense")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("MaxHealth")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("MinAttackRange")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("MinChannelRange")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<float?>("ModelScale")
|
||||
.HasColumnType("real");
|
||||
|
||||
b.Property<string>("ModelTintColor")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("MoveSoundUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("MovementPoints")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("MovementType")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("OtherCostsJson")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("other_costs");
|
||||
|
||||
b.Property<Guid?>("PreviousTierId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("Rarity")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool?>("RequiresLos")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset?>("RetiredAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<Guid?>("SetId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int>("SpCost")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("StCost")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("TerramorphaMode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("Tier")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Affinity");
|
||||
|
||||
b.HasIndex("CardType");
|
||||
|
||||
b.HasIndex("DefinitionVersion");
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.HasIndex("PreviousTierId");
|
||||
|
||||
b.HasIndex("Rarity");
|
||||
|
||||
b.HasIndex("SetId");
|
||||
|
||||
b.HasIndex("IsPublished", "SetId");
|
||||
|
||||
b.ToTable("card_definitions", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateOnly?>("ReleaseDate")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Code")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("card_sets", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CdnUploadRecord", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("ContentType")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsAiGenerated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ObjectKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Prefix")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PublicUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("UploadedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsAiGenerated");
|
||||
|
||||
b.HasIndex("ObjectKey")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("Prefix");
|
||||
|
||||
b.ToTable("cdn_upload_records", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.GameAudioConfig", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("Context")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("TrackCdnUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TrackName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Context");
|
||||
|
||||
b.HasIndex("IsActive");
|
||||
|
||||
b.ToTable("game_audio_configs", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.HighlightConfig", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("CdnPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("FallbackHex")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<float>("Fps")
|
||||
.HasColumnType("real");
|
||||
|
||||
b.Property<int>("FrameCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("HighlightType")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsAnimated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("HighlightType")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("highlight_configs", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.NewsPost", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("AuthorName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("BodyHtml")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("HeroImageUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsPublished")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset?>("PublishedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Slug")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Summary")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Slug")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("IsPublished", "PublishedAt");
|
||||
|
||||
b.ToTable("news_posts", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.SkyboxDefinition", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("CdnPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("CubeNxUrl")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("cube_nx_url");
|
||||
|
||||
b.Property<string>("CubeNyUrl")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("cube_ny_url");
|
||||
|
||||
b.Property<string>("CubeNzUrl")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("cube_nz_url");
|
||||
|
||||
b.Property<string>("CubePxUrl")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("cube_px_url");
|
||||
|
||||
b.Property<string>("CubePyUrl")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("cube_py_url");
|
||||
|
||||
b.Property<string>("CubePzUrl")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("cube_pz_url");
|
||||
|
||||
b.Property<float>("Fps")
|
||||
.HasColumnType("real");
|
||||
|
||||
b.Property<int>("FrameCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsAnimated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SkyboxType")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("skybox_type");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsActive");
|
||||
|
||||
b.ToTable("skybox_definitions", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.TileBottomModel", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("CdnKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("PublicUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Shape")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Shape", "IsActive");
|
||||
|
||||
b.ToTable("tile_bottom_models", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.TileModelBinding", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("Affinity")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ModelCdnKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ModelPublicUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Shape")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TexturePublicUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Affinity", "Shape")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("tile_model_bindings", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b =>
|
||||
{
|
||||
b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition")
|
||||
.WithMany("AnimationBindings")
|
||||
.HasForeignKey("CardDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CardDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b =>
|
||||
{
|
||||
b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition")
|
||||
.WithMany("Assets")
|
||||
.HasForeignKey("CardDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CardDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
|
||||
{
|
||||
b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "PreviousTier")
|
||||
.WithMany()
|
||||
.HasForeignKey("PreviousTierId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("SOR.Database.Entities.Catalog.CardSet", "Set")
|
||||
.WithMany("Cards")
|
||||
.HasForeignKey("SetId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.Navigation("PreviousTier");
|
||||
|
||||
b.Navigation("Set");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
|
||||
{
|
||||
b.Navigation("AnimationBindings");
|
||||
|
||||
b.Navigation("Assets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b =>
|
||||
{
|
||||
b.Navigation("Cards");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
-17
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
@@ -16,35 +16,35 @@ namespace SOR.Database.Migrations.Catalog
|
||||
schema: "catalog",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Slug = table.Column<string>(type: "text", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: false),
|
||||
Summary = table.Column<string>(type: "text", nullable: false),
|
||||
BodyHtml = table.Column<string>(type: "text", nullable: false),
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Slug = table.Column<string>(type: "text", nullable: false),
|
||||
Title = table.Column<string>(type: "text", nullable: false),
|
||||
Summary = table.Column<string>(type: "text", nullable: false),
|
||||
BodyHtml = table.Column<string>(type: "text", nullable: false),
|
||||
HeroImageUrl = table.Column<string>(type: "text", nullable: true),
|
||||
AuthorName = table.Column<string>(type: "text", nullable: false),
|
||||
PublishedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
IsPublished = table.Column<bool>(type: "boolean", nullable: false),
|
||||
CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
UpdatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
AuthorName = table.Column<string>(type: "text", nullable: false),
|
||||
PublishedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
IsPublished = table.Column<bool>(type: "boolean", nullable: false),
|
||||
CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
UpdatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_news_posts", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_news_posts_IsPublished_PublishedAt",
|
||||
schema: "catalog",
|
||||
table: "news_posts",
|
||||
columns: new[] { "IsPublished", "PublishedAt" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_news_posts_Slug",
|
||||
schema: "catalog",
|
||||
table: "news_posts",
|
||||
column: "Slug",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_news_posts_IsPublished_PublishedAt",
|
||||
schema: "catalog",
|
||||
table: "news_posts",
|
||||
columns: new[] { "IsPublished", "PublishedAt" });
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -414,6 +414,57 @@ namespace SOR.Database.Migrations.Catalog
|
||||
b.ToTable("highlight_configs", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.NewsPost", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("AuthorName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("BodyHtml")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("HeroImageUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsPublished")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset?>("PublishedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Slug")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Summary")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Slug")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("IsPublished", "PublishedAt");
|
||||
|
||||
b.ToTable("news_posts", "catalog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SOR.Database.Entities.Catalog.SkyboxDefinition", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
||||
Reference in New Issue
Block a user