Api/Brizco.Repository/Migrations/20231120145837_editActivity.cs

58 lines
1.6 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Brizco.Repository.Migrations
{
/// <inheritdoc />
public partial class editActivity : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "ShiftId",
schema: "public",
table: "Tasks",
type: "uuid",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Tasks_ShiftId",
schema: "public",
table: "Tasks",
column: "ShiftId");
migrationBuilder.AddForeignKey(
name: "FK_Tasks_Shifts_ShiftId",
schema: "public",
table: "Tasks",
column: "ShiftId",
principalSchema: "public",
principalTable: "Shifts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Tasks_Shifts_ShiftId",
schema: "public",
table: "Tasks");
migrationBuilder.DropIndex(
name: "IX_Tasks_ShiftId",
schema: "public",
table: "Tasks");
migrationBuilder.DropColumn(
name: "ShiftId",
schema: "public",
table: "Tasks");
}
}
}