fixes and tweaks
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user