Blog Post Id

This commit is contained in:
Paul Schneider 2026-09-19 21:08:10 +01:00
commit 67da921bce
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
22 changed files with 4869 additions and 96 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,52 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class blogPostId : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_blogSpotPublications_BlogSpot_BlogpostId",
table: "blogSpotPublications");
migrationBuilder.RenameColumn(
name: "BlogpostId",
table: "blogSpotPublications",
newName: "PostId");
migrationBuilder.AddForeignKey(
name: "FK_blogSpotPublications_BlogSpot_PostId",
table: "blogSpotPublications",
column: "PostId",
principalTable: "BlogSpot",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_blogSpotPublications_BlogSpot_PostId",
table: "blogSpotPublications");
migrationBuilder.RenameColumn(
name: "PostId",
table: "blogSpotPublications",
newName: "BlogpostId");
migrationBuilder.AddForeignKey(
name: "FK_blogSpotPublications_BlogSpot_BlogpostId",
table: "blogSpotPublications",
column: "BlogpostId",
principalTable: "BlogSpot",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

View file

@ -1693,10 +1693,10 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.BlogSpotPublication", b =>
{
b.Property<long>("BlogpostId")
b.Property<long>("PostId")
.HasColumnType("bigint");
b.HasKey("BlogpostId");
b.HasKey("PostId");
b.ToTable("blogSpotPublications");
});
@ -3958,13 +3958,13 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.BlogSpotPublication", b =>
{
b.HasOne("Yavsc.Models.Blog.BlogPost", "BlogPost")
b.HasOne("Yavsc.Models.Blog.BlogPost", "Post")
.WithMany()
.HasForeignKey("BlogpostId")
.HasForeignKey("PostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("BlogPost");
b.Navigation("Post");
});
modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b =>