Files
irc-netcore-api/IRaCIS.Core.Infra.EFCore/Migrations/20260429021037_SegmentIsLock.cs
T
he 962f88f94d
continuous-integration/drone/push Build is passing
添加锁定解锁分割功能
2026-04-29 10:12:02 +08:00

42 lines
1.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class SegmentIsLock : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsLock",
table: "Segment",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddForeignKey(
name: "FK_Segment_Segmentation_SegmentationId",
table: "Segment",
column: "SegmentationId",
principalTable: "Segmentation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Segment_Segmentation_SegmentationId",
table: "Segment");
migrationBuilder.DropColumn(
name: "IsLock",
table: "Segment");
}
}
}