Entity-Framework-DBZ/EntityFrameworkCore.Data/Migrations/20250414201323_AddSoftDeleteFlagLeague.cs

58 lines
1.6 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EntityFrameworkCore.Data.Migrations
{
/// <inheritdoc />
public partial class AddSoftDeleteFlagLeague : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "Leagues",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.UpdateData(
table: "Leagues",
keyColumn: "Id",
keyValue: 1,
column: "IsDeleted",
value: false);
migrationBuilder.UpdateData(
table: "Leagues",
keyColumn: "Id",
keyValue: 2,
column: "IsDeleted",
value: false);
migrationBuilder.UpdateData(
table: "Leagues",
keyColumn: "Id",
keyValue: 3,
column: "IsDeleted",
value: false);
migrationBuilder.UpdateData(
table: "Leagues",
keyColumn: "Id",
keyValue: 4,
column: "IsDeleted",
value: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "Leagues");
}
}
}