Got the new ui flow working and the models updated. Need to get changes written to the database.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace OpenArchival.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class NullableParentArtifactEntryId : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ArtifactFilePaths_ArtifactEntries_ParentArtifactEntryId",
|
||||
table: "ArtifactFilePaths");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ParentArtifactEntryId",
|
||||
table: "ArtifactFilePaths",
|
||||
type: "integer",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ArtifactFilePaths_ArtifactEntries_ParentArtifactEntryId",
|
||||
table: "ArtifactFilePaths",
|
||||
column: "ParentArtifactEntryId",
|
||||
principalTable: "ArtifactEntries",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ArtifactFilePaths_ArtifactEntries_ParentArtifactEntryId",
|
||||
table: "ArtifactFilePaths");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ParentArtifactEntryId",
|
||||
table: "ArtifactFilePaths",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ArtifactFilePaths_ArtifactEntries_ParentArtifactEntryId",
|
||||
table: "ArtifactFilePaths",
|
||||
column: "ParentArtifactEntryId",
|
||||
principalTable: "ArtifactEntries",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user