using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Nexus.Api.Migrations
{
///
public partial class AddTaskDetailFields : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "AssignedTo",
table: "Tasks",
type: "character varying(60)",
maxLength: 60,
nullable: true);
migrationBuilder.AddColumn(
name: "CreatedAt",
table: "Tasks",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "NOW()");
migrationBuilder.AddColumn(
name: "Detail",
table: "Tasks",
type: "character varying(2000)",
maxLength: 2000,
nullable: true);
migrationBuilder.AddColumn(
name: "Source",
table: "Tasks",
type: "character varying(60)",
maxLength: 60,
nullable: false,
defaultValue: "bao");
migrationBuilder.CreateIndex(
name: "IX_Tasks_AssignedTo",
table: "Tasks",
column: "AssignedTo");
migrationBuilder.CreateIndex(
name: "IX_Tasks_Source",
table: "Tasks",
column: "Source");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Tasks_AssignedTo",
table: "Tasks");
migrationBuilder.DropIndex(
name: "IX_Tasks_Source",
table: "Tasks");
migrationBuilder.DropColumn(
name: "AssignedTo",
table: "Tasks");
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Tasks");
migrationBuilder.DropColumn(
name: "Detail",
table: "Tasks");
migrationBuilder.DropColumn(
name: "Source",
table: "Tasks");
}
}
}