using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Brizco.Repository.Migrations
{
///
public partial class editTask : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "TaskDays",
schema: "public",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
DayOfWeek = table.Column(type: "integer", nullable: false),
TaskId = table.Column(type: "uuid", nullable: false),
RemovedAt = table.Column(type: "timestamp without time zone", nullable: false),
CreatedAt = table.Column(type: "timestamp without time zone", nullable: false),
CreatedBy = table.Column(type: "text", nullable: false),
IsRemoved = table.Column(type: "boolean", nullable: false),
RemovedBy = table.Column(type: "text", nullable: false),
ModifiedAt = table.Column(type: "timestamp without time zone", nullable: false),
ModifiedBy = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TaskDays", x => x.Id);
table.ForeignKey(
name: "FK_TaskDays_Tasks_TaskId",
column: x => x.TaskId,
principalSchema: "public",
principalTable: "Tasks",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_TaskDays_TaskId",
schema: "public",
table: "TaskDays",
column: "TaskId");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "TaskDays",
schema: "public");
}
}
}