Introduced the RecordState property to manage the state of prospects, enabling soft deletion and restoration. Updated related database migrations, UI interactions, and filtering logic to accommodate this addition. Also included automatic database migration at runtime to ensure schema compatibility.
30 lines
784 B
C#
30 lines
784 B
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace FoodsharingSiegen.Server.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class ProposalRecordState : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "RecordState",
|
|
table: "Prospects",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 10);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "RecordState",
|
|
table: "Prospects");
|
|
}
|
|
}
|
|
}
|