using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Lutra.Infrastructure.Sql.Migrations { /// public partial class AddVerspakketFotos : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "VerspakketFotos", columns: table => new { Id = table.Column(type: "uuid", nullable: false), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), ModifiedAt = table.Column(type: "timestamp with time zone", nullable: false), DeletedAt = table.Column(type: "timestamp with time zone", nullable: true), Data = table.Column(type: "bytea", nullable: false), VerspakketId = table.Column(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"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "VerspakketFotos"); } } }