Files
Verspakketten-API/Lutra/Lutra.Infrastructure/Migrations/20260425120000_AddVerspakketFotos.cs
T
2026-04-29 20:36:08 +02:00

49 lines
1.9 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lutra.Infrastructure.Sql.Migrations
{
/// <inheritdoc />
public partial class AddVerspakketFotos : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "VerspakketFotos",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ModifiedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
DeletedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
Data = table.Column<byte[]>(type: "bytea", nullable: false),
VerspakketId = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_VerspakketFotos", x => x.Id);
table.ForeignKey(
name: "FK_VerspakketFotos_Verspaketten_VerspakketId",
column: x => x.VerspakketId,
principalTable: "Verspaketten",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_VerspakketFotos_VerspakketId",
table: "VerspakketFotos",
column: "VerspakketId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "VerspakketFotos");
}
}
}