mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-19 01:27:53 +02:00
This commit is contained in:
50
API/Migrations/pgsql/20250518161710_UpdateCoverJob.cs
Normal file
50
API/Migrations/pgsql/20250518161710_UpdateCoverJob.cs
Normal file
@ -0,0 +1,50 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations.pgsql
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdateCoverJob : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "UpdateCoverJob_MangaId",
|
||||
table: "Jobs",
|
||||
type: "character varying(64)",
|
||||
maxLength: 64,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Jobs_UpdateCoverJob_MangaId",
|
||||
table: "Jobs",
|
||||
column: "UpdateCoverJob_MangaId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Jobs_Mangas_UpdateCoverJob_MangaId",
|
||||
table: "Jobs",
|
||||
column: "UpdateCoverJob_MangaId",
|
||||
principalTable: "Mangas",
|
||||
principalColumn: "MangaId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Jobs_Mangas_UpdateCoverJob_MangaId",
|
||||
table: "Jobs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Jobs_UpdateCoverJob_MangaId",
|
||||
table: "Jobs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UpdateCoverJob_MangaId",
|
||||
table: "Jobs");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user