using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Brizco.Repository.Migrations
{
///
public partial class editActivity : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
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);
}
///
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");
}
}
}